Class RestHelper
- java.lang.Object
-
- com.cheetahdigital.corekit.helpers.RestHelper
-
public class RestHelper extends java.lang.ObjectHelper class for setting rest dynamic settings.
-
-
Constructor Summary
Constructors Constructor Description RestHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetCacheControlDuration(android.content.Context context)Retrieves the cache control maximum age from the shared preferences.static voidsetCacheControlDuration(android.content.Context context, int maxAge)Sets the cache control maximum age to the shared preferences.
-
-
-
Method Detail
-
setCacheControlDuration
public static void setCacheControlDuration(android.content.Context context, int maxAge)Sets the cache control maximum age to the shared preferences. Calling this method will render the default duration in the integer resources useless.- Parameters:
context- used to get resourcesmaxAge- The cache max age in seconds
-
getCacheControlDuration
public static int getCacheControlDuration(android.content.Context context)
Retrieves the cache control maximum age from the shared preferences. f there's none, it gets the default from the integer resources. The integer resource attribute is 'cache_max_age_seconds'.- Parameters:
context- used to get resources- Returns:
- The cache max age in seconds
-
-