The following modifications to your code show how to get what you want.
public class CacheThisMethod : OnMethodBoundaryAspect
{
public override void OnEntry(MethodExecutionArgs args)
{
if (isCached( args.Method.name)
{
args.MethodExecutionTag = getReturnValue(args.Method.name)
OnExit(args);
}
else
{
//continue
}
}
public override void OnExit(MethodExecutionArgs args)
{
//args.Method.ReturnValue = args.MethodExecutionTag;
args.ReturnValue = args.MethodExecutionTag;
args.FlowBehavior = FlowBehavior.Return;
}
}
However, if you are working on a per method name key, then you can use a simple property for your cached return value, as a separate instance of each aspect will be created for you when you attach your advice to a method.
If there is no reason to jump to the OnExit then just add the FlowBehaviour and return value setting to the OnEntry method at the point it makes the call to the OnExit method.