Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110746088
PhabricatorCacheGeneralGarbageCollector.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Apr 27, 22:34
Size
603 B
Mime Type
text/x-php
Expires
Tue, Apr 29, 22:34 (2 d)
Engine
blob
Format
Raw Data
Handle
25778604
Attached To
rPH Phabricator
PhabricatorCacheGeneralGarbageCollector.php
View Options
<?php
final
class
PhabricatorCacheGeneralGarbageCollector
extends
PhabricatorGarbageCollector
{
public
function
collectGarbage
()
{
$key
=
'gcdaemon.ttl.general-cache'
;
$ttl
=
PhabricatorEnv
::
getEnvConfig
(
$key
);
if
(
$ttl
<=
0
)
{
return
false
;
}
$cache
=
new
PhabricatorKeyValueDatabaseCache
();
$conn_w
=
$cache
->
establishConnection
(
'w'
);
queryfx
(
$conn_w
,
'DELETE FROM %T WHERE cacheCreated < %d
ORDER BY cacheCreated ASC LIMIT 100'
,
$cache
->
getTableName
(),
time
()
-
$ttl
);
return
(
$conn_w
->
getAffectedRows
()
==
100
);
}
}
Event Timeline
Log In to Comment