source: spip-zone/_core_/plugins/textwheel/inc/memoization-mini.php @ 48813

Last change on this file since 48813 was 48813, checked in by cedric@…, 10 years ago

stocker les wheels pré-chargées dans un sous-repertoire dédié, cela facilite la purge

File size: 316 bytes
Line 
1<?php
2
3# memoization minimale (preferer le plugin memoization)
4function cache_get($key) {
5        return @unserialize(file_get_contents(_DIR_CACHE."wheels/".$key.".txt"));
6}
7function cache_set($key, $value) {
8        $dir = sous_repertoire(_DIR_CACHE,"wheels/");
9        return ecrire_fichier($dir.$key.".txt", serialize($value));
10}
11
12?>
Note: See TracBrowser for help on using the repository browser.