Skip to content

v4.1.5

Compare
Choose a tag to compare
@Ahoo-Wang Ahoo-Wang released this 27 Jul 03:42
· 187 commits to master since this release
  1. add support CacheKeyTemplate for RequestContext
  2. add Rest api for ICacheManager
  3. add support for dynamic generation of SqlMap with Repository interface
    [Cache("DateCache", "Lru", FlushInterval = 6000)]
    [Cache("LruCache", "Lru", FlushInterval = 6000)]
    [Cache("UserCache", "Fifo", FlushOnExecutes = new[] {"UpdateUserName"})]
    public interface IUsedCacheRepository
    {
        [ResultCache("DateCache", Key = "GetNow")]
        [Statement(Sql = "Select GetDate();")]
        DateTime GetNow();

        [ResultCache("LruCache", Key = "GetId:$id")]
        [Statement(Sql = "Select @id;")]
        int GetId(long id);

        [ResultCache("UserCache", Key = "GetUserById:$id")]
        [Statement(Sql = "select * from T_User where id=@id;")]
        User GetUserById(long id);

        [Statement(Sql = "update T_User set UserName=@userName where id=@id;")]
        int UpdateUserName(long id, string userName);
    }