Exemplo n.º 1
0
 public override void OnEntry(MethodExecutionArgs eventArgs)
 {
     string key = CacheKeyGenerator.GenerateKeyName(eventArgs.Method, eventArgs.Arguments.ToArray(), m_Keys);
     object value = key != null ? CacheFactory.GetInstance(CacheName).Get(key) : null;
     if (value == null)
     {
         eventArgs.MethodExecutionTag = key;
     }
     else
     {
         eventArgs.ReturnValue = value;
         eventArgs.FlowBehavior = FlowBehavior.Return;
         CacheStatisticManager.Hit(eventArgs.Method, CacheName, GetGroupName(eventArgs.Method));
     }
 }