diff options
author | 2016-10-07 22:06:58 +0200 | |
---|---|---|
committer | 2016-10-07 22:06:58 +0200 | |
commit | 51ff8de3464c6497fbe5a9352b63f675d58c5f0b (patch) | |
tree | 6cc3f4148fa2d6fbf3d07beb356298db8a9b2257 | |
parent | 0e9fb31986daffcd8814d8bf9a6168599372804a (diff) | |
download | rss-bridge-51ff8de3464c6497fbe5a9352b63f675d58c5f0b.tar.gz rss-bridge-51ff8de3464c6497fbe5a9352b63f675d58c5f0b.tar.zst rss-bridge-51ff8de3464c6497fbe5a9352b63f675d58c5f0b.zip |
[Cache] Remove orphan function utf8_encode_deep
-rw-r--r-- | caches/FileCache.php | 2 | ||||
-rw-r--r-- | lib/Cache.php | 20 |
2 files changed, 0 insertions, 22 deletions
diff --git a/caches/FileCache.php b/caches/FileCache.php index a8ab88d7..eaf16f23 100644 --- a/caches/FileCache.php +++ b/caches/FileCache.php @@ -14,8 +14,6 @@ class FileCache extends CacheAbstract { public function saveData($datas){ $this->isPrepareCache(); - //Re-encode datas to UTF-8 - //$datas = Cache::utf8_encode_deep($datas); $writeStream = file_put_contents($this->getCacheFile(), serialize($datas)); if(!$writeStream) { diff --git a/lib/Cache.php b/lib/Cache.php index a1649a0b..192cb3bf 100644 --- a/lib/Cache.php +++ b/lib/Cache.php @@ -51,26 +51,6 @@ class Cache { return preg_match('@^[A-Z][a-zA-Z0-9-]*$@', $nameCache); } - - static public function utf8_encode_deep(&$input){ - if (is_string($input)){ - $input = utf8_encode($input); - } elseif(is_array($input)){ - foreach($input as &$value){ - Cache::utf8_encode_deep($value); - } - - unset($value); - } elseif(is_object($input)){ - $vars = array_keys(get_object_vars($input)); - - foreach($vars as $var){ - Cache::utf8_encode_deep($input->$var); - } - } - } - - static public function purge(){ $cacheTimeLimit = time() - 86400; // 86400 -> 24h $cachePath = 'cache'; |