Skip to content

Support configuration options for cache entries (MemoryCache) #6

Description

@pergerch

Introduce nullable properties in the [Cache] attribute to set MemoryCacheEntryOptions for cache entries.

These 3 properties should be implemented and if set, passed to the MemoryCache.Set call by using the MemoryCacheEntryOptions parameter:

  • int AbsoluteExpirationRelativeToNow (in seconds)
  • int SlidingExpiration (in seconds)
  • CacheItemPriority Priority

Code sample:

[Cache(SlidingExpiration=10,Priority=CacheItemPriority.Low)]publicclassBasicSample{// ...}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions