1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/spip_ynh.git synced 2024-09-03 20:25:59 +02:00
spip_ynh/sources/plugins-dist/textwheel/inc/memoization-mini.php
2015-04-28 17:10:23 +02:00

14 lines
362 B
PHP

<?php
if (!defined('_ECRIRE_INC_VERSION')) return;
# memoization minimale (preferer le plugin memoization)
function cache_get($key) {
return @unserialize(file_get_contents(_DIR_CACHE."wheels/".$key.".txt"));
}
function cache_set($key, $value) {
$dir = sous_repertoire(_DIR_CACHE,"wheels/");
return ecrire_fichier($dir.$key.".txt", serialize($value));
}
?>