View Source WeChat.Storage.Cache (wechat v0.16.0)
缓存存储器
Summary
Types
@type cache_id() :: WeChat.appid()
@type cache_key() :: {cache_id(), cache_sub_key()}
@type cache_sub_key() :: term()
@type cache_value() :: term()
Functions
@spec clean(WeChat.client()) :: :ok
@spec clean_work_agent(WeChat.Work.client(), WeChat.Work.Agent.t()) :: :ok
@spec del_cache(cache_key()) :: true
@spec del_cache(cache_id(), cache_sub_key()) :: true
@spec get_cache(cache_key()) :: nil | cache_value()
@spec get_cache(cache_id(), cache_sub_key()) :: nil | cache_value()
@spec put_cache(cache_key(), cache_value()) :: true
@spec put_cache(cache_id(), cache_sub_key(), cache_value()) :: true
@spec put_caches([{cache_key(), cache_value()}]) :: true
@spec search_client(WeChat.appid() | WeChat.code_name()) :: nil | WeChat.client()
@spec search_client_agent( WeChat.appid() | WeChat.code_name(), WeChat.Work.agent() | String.t() ) :: nil | {WeChat.Work.client(), WeChat.Work.Agent.t()}
@spec set_client(WeChat.client()) :: true
@spec set_work_agent(WeChat.Work.client(), WeChat.Work.Agent.t()) :: true