Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
f54dd266
Commit
f54dd266
authored
Mar 23, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reverted incorrect renaming.
parent
94fb8672
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
FileCache.php
framework/caching/FileCache.php
+5
-5
No files found.
framework/caching/FileCache.php
View file @
f54dd266
...
...
@@ -225,10 +225,10 @@ class FileCache extends Cache
* Recursively removing expired cache files under a directory.
* This method is mainly used by [[gc()]].
* @param string $path the directory under which expired cache files are removed.
* @param boolean $
duration
dOnly whether to only remove expired cache files. If false, all files
* @param boolean $
expire
dOnly whether to only remove expired cache files. If false, all files
* under `$path` will be removed.
*/
protected
function
gcRecursive
(
$path
,
$
duration
dOnly
)
protected
function
gcRecursive
(
$path
,
$
expire
dOnly
)
{
if
((
$handle
=
opendir
(
$path
))
!==
false
)
{
while
((
$file
=
readdir
(
$handle
))
!==
false
)
{
...
...
@@ -237,11 +237,11 @@ class FileCache extends Cache
}
$fullPath
=
$path
.
DIRECTORY_SEPARATOR
.
$file
;
if
(
is_dir
(
$fullPath
))
{
$this
->
gcRecursive
(
$fullPath
,
$
duration
dOnly
);
if
(
!
$
duration
dOnly
)
{
$this
->
gcRecursive
(
$fullPath
,
$
expire
dOnly
);
if
(
!
$
expire
dOnly
)
{
@
rmdir
(
$fullPath
);
}
}
elseif
(
!
$
durationdOnly
||
$duration
dOnly
&&
@
filemtime
(
$fullPath
)
<
time
())
{
}
elseif
(
!
$
expiredOnly
||
$expire
dOnly
&&
@
filemtime
(
$fullPath
)
<
time
())
{
@
unlink
(
$fullPath
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment