Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

How to properly set Content Provider Cache Timeout ?

$
0
0

I have tried to set a cache timeout in Content Provider,

I have used the below methods,

Method 1: Set the cache setting before adding the content to cache

var content= getContent(something);
SetCacheSettings(content, new CacheSettings(TimeSpan.FromMinutes(1)));
AddContentToCache(content);

Method 2: Set the cache settings after adding the content to cache

var content= getContent(something);
AddContentToCache(content);
SetCacheSettings(content, new CacheSettings(TimeSpan.FromMinutes(1)));

Above methods have no impact. It stays in the cache. If this is not the proper way, is there a way to set the cache timeout?

Or is it possible delete the content provider cache on demand?


Viewing all articles
Browse latest Browse all 8020

Trending Articles