Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F7890162
null_cache.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
896 B
Referenced Files
None
Subscribers
None
null_cache.ex
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.NullCache
do
@moduledoc
"""
A module simulating a permanently empty cache.
"""
@behaviour
Pleroma.Caching
@impl
true
def
get!
(
_
,
_
),
do
:
nil
@impl
true
def
put
(
_
,
_
,
_
,
_
\\
nil
),
do
:
{
:ok
,
true
}
@impl
true
def
stream!
(
_
,
_
),
do
:
[]
@impl
true
def
get
(
_
,
_
),
do
:
{
:ok
,
nil
}
@impl
true
def
fetch!
(
_
,
key
,
func
)
do
case
func
.
(
key
)
do
{
_
,
res
}
->
res
res
->
res
end
end
@impl
true
def
get_and_update
(
_
,
_
,
func
)
do
func
.
(
nil
)
end
@impl
true
def
expire_at
(
_
,
_
,
_
),
do
:
{
:ok
,
true
}
@impl
true
def
exists?
(
_
,
_
),
do
:
{
:ok
,
false
}
@impl
true
def
execute!
(
_
,
func
)
do
func
.
(
:nothing
)
end
@impl
true
def
del
(
_
,
_
),
do
:
{
:ok
,
true
}
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Thu, Oct 2, 3:00 AM (13 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
480001
Default Alt Text
null_cache.ex (896 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment