* @param context the context of the invocation
* @return the key to use
*/
protected Object generateKey(CacheOperationInvocationContext<O> context) {
KeyGenerator keyGenerator = context.getOperation().getKeyGenerator();
Object key = keyGenerator.generate(context.getTarget(), context.getMethod(), context.getArgs());
if (logger.isTraceEnabled()) {
logger.trace("Computed cache key " + key + " for operation " + context.getOperation());
}
return key;
}