Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F567883
DifferentialViewStateGarbageCollector.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
653 B
Referenced Files
None
Subscribers
None
DifferentialViewStateGarbageCollector.php
View Options
<?php
final
class
DifferentialViewStateGarbageCollector
extends
PhabricatorGarbageCollector
{
const
COLLECTORCONST
=
'differential.viewstate'
;
public
function
getCollectorName
()
{
return
pht
(
'Differential View States'
);
}
public
function
getDefaultRetentionPolicy
()
{
return
phutil_units
(
'180 days in seconds'
);
}
protected
function
collectGarbage
()
{
$table
=
new
DifferentialViewState
();
$conn
=
$table
->
establishConnection
(
'w'
);
queryfx
(
$conn
,
'DELETE FROM %R WHERE dateModified < %d LIMIT 100'
,
$table
,
$this
->
getGarbageEpoch
());
return
(
$conn
->
getAffectedRows
()
==
100
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 1:05 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
119066
Default Alt Text
DifferentialViewStateGarbageCollector.php (653 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment