That method is called on the Action instance, and can do either of two things:
If the method throws an exception, then no caching will occur.
Some examples of when callbacks are useful:
(In 486fbbe64fff1d79c5f0b9903e26a7a6aa5b91d1) added support for cache group callbacks, closes #854. check out the ticket for details, guys, many of you will find this very useful
FYI, you need to throw an exception of class AgaviUncacheableException to suppress caching altogether (implemented in 437443b, see #1032 for details)