Added resource cache updater and the ability to handle context changes

I have added the features from:
https://github.com/opengeek/statcache/pull/10

But also made it context independant - so each context has it's own cache folder.

I have also added a new system parameter to allow single resource to be re-generated after the resource has been updated