]> git.mjollnir.org Git - moodle.git/commitdiff
rcache_set() and rcache_table_unset(): use a configurable TTL
authormartinlanghoff <martinlanghoff>
Wed, 27 Dec 2006 22:45:47 +0000 (22:45 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 27 Dec 2006 22:45:47 +0000 (22:45 +0000)
lib/dmllib.php

index d71b62ca0d1830457abd503c4123ab973b471c1b..759bc84acdac2504ba024ebace2d5c297826d214 100644 (file)
@@ -2097,7 +2097,7 @@ function rcache_set($table, $id, $rec) {
             // when an UPDATE or DELETE not bound by ID 
             // is taking place
             if (!$MCACHE->get($tablekey)) {
-                $MCACHE->set($reckey, $rec, false, 2);
+                $MCACHE->set($reckey, $rec, false, $CFG->rcachettl);
                 $MCACHE->delete($reckey . '_fill'); // release lock
             }
         }
@@ -2308,7 +2308,7 @@ function rcache_unset_table ($table) {
                                            $table));
         // at least as long as content keys to ensure they expire
         // before the dirty flag 
-        $MCACHE->set($tablekey, true, false, 2);
+        $MCACHE->set($tablekey, true, false, $CFG->rcachettl);
     }
     return true;
 }