/** * Invalidates a static block. This makes sure the block must be regenerated. * @param \System\Db\Database The database to use * @param string The unique key, given at the creation of the StaticBlock */ public static final function invalidate(\System\Db\Database $db, $key) { $filename = ''; if (\System\Cache\LUTCache\LUTCache::retrieve($db, $key, $filename) == \System\Cache\LUTCache\Status::CACHE_HIT) { $fullFile = self::getWritablePath($filename) . $filename; if (file_exists($fullFile)) { $file = new \System\IO\File($fullFile); $file->delete(); } } \System\Cache\LUTCache\LUTCache::invalidate($db, $key); }