Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98589839
DifferentialParseCacheGarbageCollector.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
Tue, Jan 14, 15:40
Size
682 B
Mime Type
text/x-php
Expires
Thu, Jan 16, 15:40 (2 d)
Engine
blob
Format
Raw Data
Handle
23600249
Attached To
rPH Phabricator
DifferentialParseCacheGarbageCollector.php
View Options
<?php
final
class
DifferentialParseCacheGarbageCollector
extends
PhabricatorGarbageCollector
{
const
COLLECTORCONST
=
'differential.parse'
;
public
function
getCollectorName
()
{
return
pht
(
'Differential Parse Cache'
);
}
public
function
getDefaultRetentionPolicy
()
{
return
phutil_units
(
'14 days in seconds'
);
}
protected
function
collectGarbage
()
{
$table
=
new
DifferentialChangeset
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
queryfx
(
$conn_w
,
'DELETE FROM %T WHERE dateCreated < %d LIMIT 100'
,
DifferentialChangeset
::
TABLE_CACHE
,
$this
->
getGarbageEpoch
());
return
(
$conn_w
->
getAffectedRows
()
==
100
);
}
}
Event Timeline
Log In to Comment