Added a lock for not running tasks concurrently.
Added convenience methods for updating the cache via cron.