HttpRuntimeCacheStorage
Understands how to store a ServiceStack.MiniProfiler.MiniProfiler to the System.Web.HttpRuntime.Cache
with absolute expiration.
Assembly: ServiceStack.NetFramework.dll
View Source
public class HttpRuntimeCacheStorage : IStorage
Properties
CacheDuration
How long to cache each ServiceStack.MiniProfiler.MiniProfiler for (i.e. the absolute expiration parameter of
System.Web.Caching.Cache.Insert(System.String%2cSystem.Object%2cSystem.Web.Caching.CacheDependency%2cSystem.DateTime%2cSystem.TimeSpan%2cSystem.Web.Caching.CacheItemUpdateCallback)
)
View Source
public TimeSpan CacheDuration { get; set; }
Fields
CacheKeyPrefix
The string that prefixes all keys that MiniProfilers are saved under, e.g. "mini-profiler-ecfb0050-7ce8-4bf1-bf82-2cb38e90e31e".
View Source
public const string CacheKeyPrefix = "mini-profiler-"
Methods
Save(MiniProfiler)
Saves <code data-dev-comment-type="paramref" class="paramref">profiler</code> to the HttpRuntime.Cache under a key concated with ServiceStack.MiniProfiler.Storage.HttpRuntimeCacheStorage.CacheKeyPrefix and the parameter's ServiceStack.MiniProfiler.MiniProfiler.Id.
View Source
public void Save(MiniProfiler profiler)
Parameters
Type | Name |
---|---|
ServiceStack.MiniProfiler.MiniProfiler | profiler |
Load(Guid)
Returns the saved ServiceStack.MiniProfiler.MiniProfiler identified by <code data-dev-comment-type="paramref" class="paramref">id</code>. Also marks the resulting profiler ServiceStack.MiniProfiler.MiniProfiler.HasUserViewed to true.
View Source
public MiniProfiler Load(Guid id)
Returns
ServiceStack.MiniProfiler.MiniProfiler
Parameters
Type | Name |
---|---|
System.Guid | id |
GetUnviewedIds(String)
Returns a list of ServiceStack.MiniProfiler.MiniProfiler.Ids that haven't been seen by <code data-dev-comment-type="paramref" class="paramref">user</code>.
View Source
public List<Guid> GetUnviewedIds(string user)
Returns
System.Collections.Generic.List<System.Guid>
Parameters
Type | Name | Description |
---|---|---|
System.String | user | User identified by the current MiniProfiler.Settings.UserProvider. |
|