DripDrop.Cache (DripDrop v0.2.0)

Copy Markdown View Source

Local Nebulex cache used for short-lived dispatch and provider state.

Summary

Functions

Callback implementation for Nebulex.Cache.delete/2.

Callback implementation for Nebulex.Cache.delete!/2.

Callback implementation for Nebulex.Cache.fetch/2.

Callback implementation for Nebulex.Cache.fetch!/2.

A convenience function for retrieving the current generations.

Fetches key, normalizing the result to {:ok, value} / {:error, reason}.

A convenience function for creating new generations.

A convenience function for retrieving the newer generation.

Callback implementation for Nebulex.Cache.put/3.

Callback implementation for Nebulex.Cache.put!/3.

A convenience function for reset the GC interval.

Callback implementation for Nebulex.Cache.take/2.

Callback implementation for Nebulex.Cache.take!/2.

Callback implementation for Nebulex.Cache.touch/2.

Callback implementation for Nebulex.Cache.touch!/2.

Callback implementation for Nebulex.Cache.ttl/2.

Callback implementation for Nebulex.Cache.ttl/3.

Callback implementation for Nebulex.Cache.ttl!/2.

Functions

count_all(query_spec \\ [], opts \\ [])

Callback implementation for Nebulex.Cache.count_all/2.

count_all(dynamic_cache, query_spec, opts)

Callback implementation for Nebulex.Cache.count_all/3.

count_all!(query_spec \\ [], opts \\ [])

Callback implementation for Nebulex.Cache.count_all!/2.

count_all!(dynamic_cache, query_spec, opts)

Callback implementation for Nebulex.Cache.count_all!/3.

decr(key, amount \\ 1, opts \\ [])

Callback implementation for Nebulex.Cache.decr/3.

decr(dynamic_cache, key, amount, opts)

Callback implementation for Nebulex.Cache.decr/4.

decr!(key, amount \\ 1, opts \\ [])

Callback implementation for Nebulex.Cache.decr!/3.

decr!(dynamic_cache, key, amount, opts)

Callback implementation for Nebulex.Cache.decr!/4.

delete(key, opts \\ [])

Callback implementation for Nebulex.Cache.delete/2.

delete(dynamic_cache, key, opts)

Callback implementation for Nebulex.Cache.delete/3.

delete!(key, opts \\ [])

Callback implementation for Nebulex.Cache.delete!/2.

delete!(dynamic_cache, key, opts)

Callback implementation for Nebulex.Cache.delete!/3.

delete_all(query_spec \\ [], opts \\ [])

Callback implementation for Nebulex.Cache.delete_all/2.

delete_all(dynamic_cache, query_spec, opts)

Callback implementation for Nebulex.Cache.delete_all/3.

delete_all!(query_spec \\ [], opts \\ [])

Callback implementation for Nebulex.Cache.delete_all!/2.

delete_all!(dynamic_cache, query_spec, opts)

Callback implementation for Nebulex.Cache.delete_all!/3.

expire(key, ttl, opts \\ [])

Callback implementation for Nebulex.Cache.expire/3.

expire(dynamic_cache, key, ttl, opts)

Callback implementation for Nebulex.Cache.expire/4.

expire!(key, ttl, opts \\ [])

Callback implementation for Nebulex.Cache.expire!/3.

expire!(dynamic_cache, key, ttl, opts)

Callback implementation for Nebulex.Cache.expire!/4.

fetch(key, opts \\ [])

Callback implementation for Nebulex.Cache.fetch/2.

fetch(dynamic_cache, key, opts)

Callback implementation for Nebulex.Cache.fetch/3.

fetch!(key, opts \\ [])

Callback implementation for Nebulex.Cache.fetch!/2.

fetch!(dynamic_cache, key, opts)

Callback implementation for Nebulex.Cache.fetch!/3.

fetch_or_store(key, fun, opts \\ [])

Callback implementation for Nebulex.Cache.fetch_or_store/3.

fetch_or_store(dynamic_cache, key, fun, opts)

Callback implementation for Nebulex.Cache.fetch_or_store/4.

fetch_or_store!(key, fun, opts \\ [])

Callback implementation for Nebulex.Cache.fetch_or_store!/3.

fetch_or_store!(dynamic_cache, key, fun, opts)

Callback implementation for Nebulex.Cache.fetch_or_store!/4.

generations()

A convenience function for retrieving the current generations.

get(key, default \\ nil, opts \\ [])

Callback implementation for Nebulex.Cache.get/3.

get(dynamic_cache, key, default, opts)

Callback implementation for Nebulex.Cache.get/4.

get!(key, default \\ nil, opts \\ [])

Callback implementation for Nebulex.Cache.get!/3.

get!(dynamic_cache, key, default, opts)

Callback implementation for Nebulex.Cache.get!/4.

get_all(query_spec \\ [], opts \\ [])

Callback implementation for Nebulex.Cache.get_all/2.

get_all(dynamic_cache, query_spec, opts)

Callback implementation for Nebulex.Cache.get_all/3.

get_all!(query_spec \\ [], opts \\ [])

Callback implementation for Nebulex.Cache.get_all!/2.

get_all!(dynamic_cache, query_spec, opts)

Callback implementation for Nebulex.Cache.get_all!/3.

get_and_update(key, fun, opts \\ [])

Callback implementation for Nebulex.Cache.get_and_update/3.

get_and_update(dynamic_cache, key, fun, opts)

Callback implementation for Nebulex.Cache.get_and_update/4.

get_and_update!(key, fun, opts \\ [])

Callback implementation for Nebulex.Cache.get_and_update!/3.

get_and_update!(dynamic_cache, key, fun, opts)

Callback implementation for Nebulex.Cache.get_and_update!/4.

get_or_store(key, fun, opts \\ [])

Callback implementation for Nebulex.Cache.get_or_store/3.

get_or_store(dynamic_cache, key, fun, opts)

Callback implementation for Nebulex.Cache.get_or_store/4.

get_or_store!(key, fun, opts \\ [])

Callback implementation for Nebulex.Cache.get_or_store!/3.

get_or_store!(dynamic_cache, key, fun, opts)

Callback implementation for Nebulex.Cache.get_or_store!/4.

has_key?(key, opts \\ [])

Callback implementation for Nebulex.Cache.has_key?/2.

has_key?(dynamic_cache, key, opts)

Callback implementation for Nebulex.Cache.has_key?/3.

in_transaction?(opts \\ [])

Callback implementation for Nebulex.Cache.in_transaction?/1.

in_transaction?(dynamic_cache, opts)

Callback implementation for Nebulex.Cache.in_transaction?/2.

incr(key, amount \\ 1, opts \\ [])

Callback implementation for Nebulex.Cache.incr/3.

incr(dynamic_cache, key, amount, opts)

Callback implementation for Nebulex.Cache.incr/4.

incr!(key, amount \\ 1, opts \\ [])

Callback implementation for Nebulex.Cache.incr!/3.

incr!(dynamic_cache, key, amount, opts)

Callback implementation for Nebulex.Cache.incr!/4.

info(spec \\ :all, opts \\ [])

Callback implementation for Nebulex.Cache.info/2.

info(dynamic_cache, spec, opts)

Callback implementation for Nebulex.Cache.info/3.

info!(spec \\ :all, opts \\ [])

Callback implementation for Nebulex.Cache.info!/2.

info!(dynamic_cache, spec, opts)

Callback implementation for Nebulex.Cache.info!/3.

lookup(key)

@spec lookup(term()) :: {:ok, term()} | {:error, term()}

Fetches key, normalizing the result to {:ok, value} / {:error, reason}.

Nebulex 3 returns those tuples already; Nebulex 2 returns the bare value (nil on miss) and raises on errors. Going through this function lets callers behave the same on either major version, and the branch is resolved at compile time so neither pays for the check.

new_generation(opts \\ [])

A convenience function for creating new generations.

newer_generation()

A convenience function for retrieving the newer generation.

put(key, value, opts \\ [])

Callback implementation for Nebulex.Cache.put/3.

put(dynamic_cache, key, value, opts)

Callback implementation for Nebulex.Cache.put/4.

put!(key, value, opts \\ [])

Callback implementation for Nebulex.Cache.put!/3.

put!(dynamic_cache, key, value, opts)

Callback implementation for Nebulex.Cache.put!/4.

put_all(entries, opts \\ [])

Callback implementation for Nebulex.Cache.put_all/2.

put_all(dynamic_cache, entries, opts)

Callback implementation for Nebulex.Cache.put_all/3.

put_all!(entries, opts \\ [])

Callback implementation for Nebulex.Cache.put_all!/2.

put_all!(dynamic_cache, entries, opts)

Callback implementation for Nebulex.Cache.put_all!/3.

put_new(key, value, opts \\ [])

Callback implementation for Nebulex.Cache.put_new/3.

put_new(dynamic_cache, key, value, opts)

Callback implementation for Nebulex.Cache.put_new/4.

put_new!(key, value, opts \\ [])

Callback implementation for Nebulex.Cache.put_new!/3.

put_new!(dynamic_cache, key, value, opts)

Callback implementation for Nebulex.Cache.put_new!/4.

put_new_all(entries, opts \\ [])

Callback implementation for Nebulex.Cache.put_new_all/2.

put_new_all(dynamic_cache, entries, opts)

Callback implementation for Nebulex.Cache.put_new_all/3.

put_new_all!(entries, opts \\ [])

Callback implementation for Nebulex.Cache.put_new_all!/2.

put_new_all!(dynamic_cache, entries, opts)

Callback implementation for Nebulex.Cache.put_new_all!/3.

register_event_listener(listener, opts \\ [])

Callback implementation for Nebulex.Cache.register_event_listener/2.

register_event_listener(dynamic_cache, listener, opts)

Callback implementation for Nebulex.Cache.register_event_listener/3.

register_event_listener!(listener, opts \\ [])

Callback implementation for Nebulex.Cache.register_event_listener!/2.

register_event_listener!(dynamic_cache, listener, opts)

Callback implementation for Nebulex.Cache.register_event_listener!/3.

replace(key, value, opts \\ [])

Callback implementation for Nebulex.Cache.replace/3.

replace(dynamic_cache, key, value, opts)

Callback implementation for Nebulex.Cache.replace/4.

replace!(key, value, opts \\ [])

Callback implementation for Nebulex.Cache.replace!/3.

replace!(dynamic_cache, key, value, opts)

Callback implementation for Nebulex.Cache.replace!/4.

reset_gc_interval()

A convenience function for reset the GC interval.

stream(query_spec \\ [], opts \\ [])

Callback implementation for Nebulex.Cache.stream/2.

stream(dynamic_cache, query_spec, opts)

Callback implementation for Nebulex.Cache.stream/3.

stream!(query_spec \\ [], opts \\ [])

Callback implementation for Nebulex.Cache.stream!/2.

stream!(dynamic_cache, query_spec, opts)

Callback implementation for Nebulex.Cache.stream!/3.

take(key, opts \\ [])

Callback implementation for Nebulex.Cache.take/2.

take(dynamic_cache, key, opts)

Callback implementation for Nebulex.Cache.take/3.

take!(key, opts \\ [])

Callback implementation for Nebulex.Cache.take!/2.

take!(dynamic_cache, key, opts)

Callback implementation for Nebulex.Cache.take!/3.

touch(key, opts \\ [])

Callback implementation for Nebulex.Cache.touch/2.

touch(dynamic_cache, key, opts)

Callback implementation for Nebulex.Cache.touch/3.

touch!(key, opts \\ [])

Callback implementation for Nebulex.Cache.touch!/2.

touch!(dynamic_cache, key, opts)

Callback implementation for Nebulex.Cache.touch!/3.

transaction(fun, opts \\ [])

Callback implementation for Nebulex.Cache.transaction/2.

transaction(dynamic_cache, fun, opts)

Callback implementation for Nebulex.Cache.transaction/3.

ttl(key, opts \\ [])

Callback implementation for Nebulex.Cache.ttl/2.

ttl(dynamic_cache, key, opts)

Callback implementation for Nebulex.Cache.ttl/3.

ttl!(key, opts \\ [])

Callback implementation for Nebulex.Cache.ttl!/2.

ttl!(dynamic_cache, key, opts)

Callback implementation for Nebulex.Cache.ttl!/3.

unregister_event_listener(id, opts \\ [])

Callback implementation for Nebulex.Cache.unregister_event_listener/2.

unregister_event_listener(dynamic_cache, id, opts)

Callback implementation for Nebulex.Cache.unregister_event_listener/3.

unregister_event_listener!(id, opts \\ [])

Callback implementation for Nebulex.Cache.unregister_event_listener!/2.

unregister_event_listener!(dynamic_cache, id, opts)

Callback implementation for Nebulex.Cache.unregister_event_listener!/3.

update(key, initial, fun, opts \\ [])

Callback implementation for Nebulex.Cache.update/4.

update(dynamic_cache, key, initial, fun, opts)

Callback implementation for Nebulex.Cache.update/5.

update!(key, initial, fun, opts \\ [])

Callback implementation for Nebulex.Cache.update!/4.

update!(dynamic_cache, key, initial, fun, opts)

Callback implementation for Nebulex.Cache.update!/5.