React to SetSlidingExpiration spelling fix.
This commit is contained in:
parent
db78efda4f
commit
9bc33d6ce8
|
|
@ -68,7 +68,7 @@ namespace MusicStore.Areas.Admin.Controllers
|
||||||
var album = cache.GetOrAdd(cacheId, context =>
|
var album = cache.GetOrAdd(cacheId, context =>
|
||||||
{
|
{
|
||||||
//Remove it from cache if not retrieved in last 10 minutes
|
//Remove it from cache if not retrieved in last 10 minutes
|
||||||
context.SetSlidingExpiraiton(TimeSpan.FromMinutes(10));
|
context.SetSlidingExpiration(TimeSpan.FromMinutes(10));
|
||||||
//If this returns null how do we prevent the cache to store this.
|
//If this returns null how do we prevent the cache to store this.
|
||||||
return db.Albums.Where(a => a.AlbumId == id).FirstOrDefault();
|
return db.Albums.Where(a => a.AlbumId == id).FirstOrDefault();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ namespace MusicStore.Controllers
|
||||||
var album = cache.GetOrAdd(string.Format("album_{0}", id), context =>
|
var album = cache.GetOrAdd(string.Format("album_{0}", id), context =>
|
||||||
{
|
{
|
||||||
//Remove it from cache if not retrieved in last 10 minutes
|
//Remove it from cache if not retrieved in last 10 minutes
|
||||||
context.SetSlidingExpiraiton(TimeSpan.FromMinutes(10));
|
context.SetSlidingExpiration(TimeSpan.FromMinutes(10));
|
||||||
|
|
||||||
var albumData = db.Albums.Single(a => a.AlbumId == id);
|
var albumData = db.Albums.Single(a => a.AlbumId == id);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue