/**
* @Around execution(int examples.caching.Pi.getPiDecimal(int))
*/
public Object cache(final JoinPoint joinPoint) throws Throwable {
MethodSignature signature = (MethodSignature)joinPoint.getSignature();
final Long hash = new Long(calculateHash(signature));
final Object cachedResult = m_cache.get(hash);
if (cachedResult != null) {
System.out.println("using cache");
CacheStatistics.addCacheInvocation(signature.getName(), signature.getParameterTypes());
System.out.println("parameter: timeout = " + ___AW_getParameter("timeout"));
return cachedResult;
}
final Object result = joinPoint.proceed();