Skip to content

Commit 656a22c

Browse files
author
bnu
committed
Merge branch 'release/1.8.25'
2 parents 99f185c + 203e352 commit 656a22c

27 files changed

+393
-165
lines changed

classes/cache/CacheFile.class.php

+24-24
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Filedisk Cache Handler
88
*
9-
* @author NAVER (developers@xpressengine.com)
9+
* @author NAVER (developers@xpressengine.com)
1010
*/
1111
class CacheFile extends CacheBase
1212
{
@@ -78,10 +78,10 @@ function put($key, $obj, $valid_time = 0)
7878
$content[] = 'if(!defined(\'__XE__\')) { exit(); }';
7979
$content[] = 'return \'' . addslashes(serialize($obj)) . '\';';
8080
FileHandler::writeFile($cache_file, implode(PHP_EOL, $content));
81-
if(function_exists('opcache_invalidate'))
82-
{
83-
@opcache_invalidate($cache_file, true);
84-
}
81+
if(function_exists('opcache_invalidate'))
82+
{
83+
@opcache_invalidate($cache_file, true);
84+
}
8585
}
8686

8787
/**
@@ -94,15 +94,15 @@ function put($key, $obj, $valid_time = 0)
9494
function isValid($key, $modified_time = 0)
9595
{
9696
$cache_file = $this->getCacheFileName($key);
97-
97+
9898
if(file_exists($cache_file))
9999
{
100-
if($modified_time > 0 && filemtime($cache_file) < $modified_timed)
101-
{
102-
FileHandler::removeFile($cache_file);
103-
return false;
104-
}
105-
100+
if($modified_time > 0 && filemtime($cache_file) < $modified_time)
101+
{
102+
FileHandler::removeFile($cache_file);
103+
return false;
104+
}
105+
106106
return true;
107107
}
108108

@@ -118,19 +118,19 @@ function isValid($key, $modified_time = 0)
118118
*/
119119
function get($key, $modified_time = 0)
120120
{
121-
if(!$cache_file = FileHandler::exists($this->getCacheFileName($key)))
122-
{
123-
return false;
124-
}
121+
if(!$cache_file = FileHandler::exists($this->getCacheFileName($key)))
122+
{
123+
return false;
124+
}
125125

126-
if($modified_time > 0 && filemtime($cache_file) < $modified_timed)
126+
if($modified_time > 0 && filemtime($cache_file) < $modified_time)
127127
{
128-
FileHandler::removeFile($cache_file);
128+
FileHandler::removeFile($cache_file);
129129
return false;
130130
}
131131

132-
$content = include($cache_file);
133-
132+
$content = include($cache_file);
133+
134134
return unserialize(stripslashes($content));
135135
}
136136

@@ -143,10 +143,10 @@ function get($key, $modified_time = 0)
143143
function _delete($_key)
144144
{
145145
$cache_file = $this->getCacheFileName($_key);
146-
if(function_exists('opcache_invalidate'))
147-
{
148-
@opcache_invalidate($cache_file, true);
149-
}
146+
if(function_exists('opcache_invalidate'))
147+
{
148+
@opcache_invalidate($cache_file, true);
149+
}
150150
FileHandler::removeFile($cache_file);
151151
}
152152

0 commit comments

Comments
 (0)