cache tweaks
This commit is contained in:
parent
a9b3bc8da9
commit
dc34228659
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ namespace BirdsiteLive.Twitter
|
||||||
private readonly MemoryCacheEntryOptions _cacheEntryOptions = new MemoryCacheEntryOptions()
|
private readonly MemoryCacheEntryOptions _cacheEntryOptions = new MemoryCacheEntryOptions()
|
||||||
.SetSize(1)//Size amount
|
.SetSize(1)//Size amount
|
||||||
//Priority on removing when reaching size limit (memory pressure)
|
//Priority on removing when reaching size limit (memory pressure)
|
||||||
.SetPriority(CacheItemPriority.High)
|
.SetPriority(CacheItemPriority.Low)
|
||||||
// Keep in cache for this time, reset time if accessed.
|
// Keep in cache for this time, reset time if accessed.
|
||||||
.SetSlidingExpiration(TimeSpan.FromHours(24))
|
.SetSlidingExpiration(TimeSpan.FromHours(24))
|
||||||
// Remove from cache after this time, regardless of sliding expiration
|
// Remove from cache after this time, regardless of sliding expiration
|
||||||
|
@ -32,7 +32,7 @@ namespace BirdsiteLive.Twitter
|
||||||
|
|
||||||
_userCache = new MemoryCache(new MemoryCacheOptions()
|
_userCache = new MemoryCache(new MemoryCacheOptions()
|
||||||
{
|
{
|
||||||
SizeLimit = settings.UserCacheCapacity
|
SizeLimit = 5000 //TODO make this use number of entries in db
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Add table
Reference in a new issue