Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F8321954
CacheVoid.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
CacheVoid.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Keruald\Cache\Engines
;
use
Keruald\Cache\Cache
;
use
DateInterval
;
/**
* "blackhole" void cache
*
* This class doesn't cache information, it's void wrapper
* get will always return null
* set and delete do nothing
*
* It will be used by default if no cache is specified.
*/
class
CacheVoid
extends
Cache
{
static
function
load
(
$config
)
:
self
{
return
new
static
;
}
function
get
(
string
$key
,
mixed
$default
=
null
)
:
mixed
{
return
$default
;
}
function
set
(
string
$key
,
mixed
$value
,
null
|
int
|
DateInterval
$ttl
=
null
,
)
:
bool
{
return
true
;
}
function
delete
(
string
$key
)
:
bool
{
return
true
;
}
public
function
clear
()
:
bool
{
return
true
;
}
public
function
has
(
string
$key
)
:
bool
{
return
false
;
}
public
function
getMultiple
(
iterable
$keys
,
mixed
$default
=
null
)
:
iterable
{
foreach
(
$keys
as
$key
)
{
yield
$key
=>
$default
;
}
}
public
function
setMultiple
(
iterable
$values
,
null
|
int
|
DateInterval
$ttl
=
null
,
)
:
bool
{
return
true
;
}
public
function
deleteMultiple
(
iterable
$keys
)
:
bool
{
return
true
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 16:56 (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2570846
Default Alt Text
CacheVoid.php (1 KB)
Attached To
Mode
rKERUALD Keruald libraries development repository
Attached
Detach File
Event Timeline
Log In to Comment