segmented_cache_server (segmented_cache v0.5.1)

View Source

Summary

Types

request_content/0

-type request_content() :: term().

state/0

-type state() ::
          #cache_state{scope :: segmented_cache:scope(),
                       name :: segmented_cache:name(),
                       ttl :: timeout(),
                       timer_ref :: undefined | reference()}.

Functions

handle_call(Msg, From, State)

-spec handle_call(any(), gen_server:from(), state()) -> {reply, ok, state()}.

handle_cast(Cast, Cache_state)

-spec handle_cast(Cast, state()) -> {noreply, state()}
                     when
                         Cast ::
                             {delete_entry, segmented_cache:key()} |
                             {delete_pattern, ets:match_pattern()}.

handle_info(Msg, Cache_state)

-spec handle_info(any(), state()) -> {noreply, state()} | {stop, term(), state()}.

init(_)

-spec init({segmented_cache:name(), segmented_cache:opts()}) -> {ok, state()}.

request_delete_entry(Name, Entry)

-spec request_delete_entry(segmented_cache:name(), request_content()) -> ok.

request_delete_pattern(Name, Pattern)

-spec request_delete_pattern(segmented_cache:name(), request_content()) -> ok.

start(Name, Opts)

start_link(Name, Opts)

terminate(Reason, Cache_state)

-spec terminate(normal | shutdown | {shutdown, term()} | term(), state()) -> term().