nebulex v1.0.0-rc.2 Nebulex.Object View Source
Defines a Cache Object.
This is the struct used by the caches to store and retrieve data.
Link to this section Summary
Functions
Creates a new Nebulex.Object
with the given key
Creates a new Nebulex.Object
with the given key
and value
Creates a new Nebulex.Object
with the given key
, value
and version
Link to this section Types
Link to this type
t()
View Source
t() :: %Nebulex.Object{key: any(), ttl: timeout(), value: any(), version: any()}
Link to this section Functions
Creates a new Nebulex.Object
with the given key
.
Example
Nebulex.Object.new("mykey")
Link to this function
new(key, value)
View Source
new(key :: any(), value :: any()) :: Nebulex.Object.t()
Creates a new Nebulex.Object
with the given key
and value
.
Example
Nebulex.Object.new("foo", "bar")
Link to this function
new(key, value, version)
View Source
new(key :: any(), value :: any(), version :: any()) :: Nebulex.Object.t()
Creates a new Nebulex.Object
with the given key
, value
and version
.
Example
Nebulex.Object.new("foo", "bar", "v1")