get($key); self::getApp()->save_timestamp($time, 'cache'); return $return; } /** * @brief Put data in the cache according to the key * * The input $value can have multiple formats. * * @param string $key The key to the cached data * @param mixed $value The value that is about to be stored * @param integer $duration The cache lifespan * * @return bool */ public static function set($key, $value, $duration = self::MONTH) { $time = microtime(true); $return = self::getDriver()->set($key, $value, $duration); self::getApp()->save_timestamp($time, 'cache_write'); return $return; } /** * @brief Remove outdated data from the cache * * @param integer $max_level The maximum cache level that is to be cleared * * @return void */ public static function clear() { return self::getDriver()->clear(); } }