Issue background jobs stats

Implementation of the background job for refreshing the cached functions from site stats in a regular basis.
This is a first approach and tries to be as simple as possible in order not to add complexity before it is needed (that will happen, of course).