diff options
author | Mario <mario@mariovavti.com> | 2023-11-25 17:12:28 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-11-25 17:12:28 +0100 |
commit | 0fd8e02a884a2b040dca62ab5d9674db5f6a070b (patch) | |
tree | 586ee43f32f6f14368c09026f21dcd3244ea24b6 /Zotlabs/Lib/Cache.php | |
parent | 82e704ec5b107823c09f1387e9091adee53a4c2d (diff) | |
parent | 55c4bfb67009c598f25b1a8189604bfffa73dfbb (diff) | |
download | volse-hubzilla-8.8.tar.gz volse-hubzilla-8.8.tar.bz2 volse-hubzilla-8.8.zip |
Merge branch '8.8RC'8.8
Diffstat (limited to 'Zotlabs/Lib/Cache.php')
-rw-r--r-- | Zotlabs/Lib/Cache.php | 14 |
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())); |