aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Cache.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2023-12-16 16:05:52 +0100
committerHarald Eilertsen <haraldei@anduin.net>2023-12-16 16:05:52 +0100
commit19dd1fe86605bc85e8a0bf4efd6f195db258f60a (patch)
tree5d5b1fac3ad1760189ea0daf1bf5639e4ba0d100 /Zotlabs/Lib/Cache.php
parent6a5f78543fb2f5329e54209253b8c0d0f1d7a91d (diff)
parent69266cd6c65d228320dede32a343a9d3f3ea63df (diff)
downloadvolse-hubzilla-19dd1fe86605bc85e8a0bf4efd6f195db258f60a.tar.gz
volse-hubzilla-19dd1fe86605bc85e8a0bf4efd6f195db258f60a.tar.bz2
volse-hubzilla-19dd1fe86605bc85e8a0bf4efd6f195db258f60a.zip
Merge branch 'dev' into tests/test-db-setup-wip
Diffstat (limited to 'Zotlabs/Lib/Cache.php')
-rw-r--r--Zotlabs/Lib/Cache.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Cache.php b/Zotlabs/Lib/Cache.php
index a5052a183..60bf64611 100644
--- a/Zotlabs/Lib/Cache.php
+++ b/Zotlabs/Lib/Cache.php
@@ -5,17 +5,17 @@ namespace Zotlabs\Lib;
/**
* cache api
*/
-
+
class Cache {
-
+
/**
* @brief Returns cached content
- *
+ *
* @param string $key
* @param string $age in SQL format, default is '30 DAY'
* @return string
*/
-
+
public static function get($key, $age = '') {
$hash = hash('whirlpool',$key);
@@ -25,12 +25,12 @@ class Cache {
db_utcnow(),
db_quoteinterval(($age ? $age : get_config('system','object_cache_days', '30') . ' DAY'))
);
-
+
if ($r)
return $r[0]['v'];
return null;
}
-
+
public static function set($key,$value) {
$hash = hash('whirlpool',$key);
@@ -45,7 +45,7 @@ class Cache {
dbesc($hash));
}
else {
- q("INSERT INTO cache ( k, v, updated) VALUES ('%s','%s','%s')",
+ q("INSERT INTO cache (k, v, updated) VALUES ('%s', '%s', '%s')",
dbesc($hash),
dbesc($value),
dbesc(datetime_convert()));