+ public String getCacheLmit(String cacheKey)
+ {
+ String uniqueKey = cacheKey + DEFAULT_LIMIT_KEY;
+ return Cache.getDefault(uniqueKey, DEFAULT_LIMIT);
+ }
+
+ public int updateCacheLimit(String cacheKey, String newLimit)
+ {
+ String uniqueKey = cacheKey + DEFAULT_LIMIT_KEY;
+ String formerLimit = getCacheLmit(cacheKey);
+ if (newLimit != null && !newLimit.isEmpty()
+ && !formerLimit.equals(newLimit))
+ {
+ Cache.setProperty(uniqueKey, newLimit);
+ formerLimit = newLimit;
+ }
+ return Integer.valueOf(formerLimit);
+ }
+