hpcugent/VSC-tools — pull request #17 by itkovian (2012-11-07 21:44:24+00:00)
Title: Cache

Implementation for a file-based cache where one can store a piece of data that can be pickled and that is identified by a key. Additionally, all stored data is accompanied by the timestamp of the storing moment, so data can be updated after a specified time has passed only.

Example is for the notifications to users, as we do not want to bug them every time we e.g., detect them exceeding their quota, as that would send a mail every 15 minutes (or whatever check interval is used). Using this cache, we can retrieve the data, compare its timestamp with the current time and only send a mail if we detect sufficient time has passed.