added support for cache group callbacks, closes #854. check out the ticket for details, guys, many of you will find this very useful