Skip to content
Permalink
Browse files
Merge pull request #744 from tarasfrompir/patch-5
Update caching.class.php
  • Loading branch information
sergejey committed May 26, 2020
2 parents fbb6e16 + 8fc1dfe commit 3cbe926369d4f98c2d23f2baff114809bd6595f8
Showing 1 changed file with 4 additions and 1 deletion.
@@ -9,7 +9,10 @@
*/
function saveToCache($key, $value, $ttl = 532800)
{
if (is_array($value) || strlen($value) > 255) return;
if (is_array($value) || strlen($value) > 255) {
SQLExec("DELETE FROM cached_values WHERE KEYWORD='".$key."'");
return;
}

if (isset($_SERVER['REQUEST_METHOD'])) {
global $memory_cache;

0 comments on commit 3cbe926

Please sign in to comment.