Skip to content

An extension library for AspectCore based EasyCaching interceptor with simple expression supported to generate cache key from method parameters.

License

Notifications You must be signed in to change notification settings

hzcc-dev/EasyCaching.AspectCore.Expression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyCaching.AspectCore.Expression

An extension library for AspectCore based EasyCaching interceptor with simple expression supported to generate cache key from method parameters.

Usage

public class DataDictionaryItemInput
{
    public string Name { get; set; }
    public string Val { get; set; }
}
public interface IDataDictionaryService
{
    [EasyCachingAble(CacheKeyPrefix = "dict:${0}", Expiration = 604800)]
    public List<DataDictionaryOutput> GetDictionary(string name);
    
    [EasyCachingAble(CacheKeyPrefix = "dict:${0:Name}:${0:Val}", Expiration = 3600)]
    public string GetDicText(DataDictionaryItemInput input);
    
    [EasyCachingDel(CacheKeyPrefix = "dict:${0:Name}")]
    [EasyCachingDel(CacheKeyPrefix = "dict:${0:Name}:${0:Val}")]
    public Result UpdateDataDictionary(DataDictionaryUpdate vm);
}

EasyCachingDelAttribute

EasyCachingDelAttribute is same as EasyCachingEvictAttribute from EasyCaching except that it can be used multiple times on single method.

About

An extension library for AspectCore based EasyCaching interceptor with simple expression supported to generate cache key from method parameters.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages