% title # Cache aspect %> <% group # Cache aspect %>
This aspect helps to cache method calls. The aspect uses input method parameters to create a cache key and caches return value and all output (both ref and out) parameters. By default only value types and string type of the method parameters are used to create a cache key. Any other types are ignored. This behavior can be changed by assigning the CacheAspect.IsCacheableParameterType property to a delegate providing custom logic.
CacheAspect.cs <% ..\..\..\HowTo\Aspects\CacheAspect.cs %> If we decompile the actual emitted TestClass class, we may see something like the following: <% Doc\Aspects\CacheAspect.cs %>