cache_class_file; } /** * This method stores a PGT and its corresponding PGT Iou in the cache. * * @param string $pgt the PGT * @param string $pgt_iou the PGT iou */ public function write($pgt, $pgt_iou) { $cache = StudipCacheFactory::getCache(); $cache_key = 'pgtiou/' . $pgt_iou; return $cache->write($cache_key, $pgt); } /** * This method reads a PGT corresponding to a PGT Iou and deletes the * corresponding cache entry. * * @param string $pgt_iou the PGT iou * * @return the corresponding PGT, or FALSE on error */ public function read($pgt_iou) { $cache = StudipCacheFactory::getCache(); $cache_key = 'pgtiou/' . $pgt_iou; $pgt = $cache->read($cache_key); $cache->expire($cache_key); return $pgt; } }