View Source cfclient_cache (cfclient v1.2.0)

Functions to manage cache of Flag and Segment data from server.

Link to this section Summary

Link to this section Types

Link to this section Functions

-spec cache_flag(flag()) -> ok | {error, outdated}.
Link to this function

cache_flag(Value, Config)

View Source
-spec cache_flag(flag(), config()) -> ok | {error, outdated}.
-spec cache_segment(segment()) -> ok | {error, outdated}.
Link to this function

cache_segment(Value, Config)

View Source
-spec cache_segment(segment(), config()) -> ok | {error, outdated}.
-spec get_value({flag, binary()} | {segment, binary()}) -> {ok, flag() | segment()} | {error, undefined}.
Get Flag or Segment from cache.
-spec get_value({flag, binary()} | {segment, binary()}, config()) ->
             {ok, flag() | segment()} | {error, undefined}.
-spec set_pid(pid()) -> ok.
-spec set_value({flag, binary()} | {segment, binary()}, flag() | segment()) -> ok | {error, outdated}.
Store flag or segment into cache with new value.