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
Link to this function

clean_work_agent(client, agent)

View Source
@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
Link to this function

put_cache(id, sub_key, value)

View Source
@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()
Link to this function

search_client_agent(app_flag, agent_flag)

View Source
@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
Link to this function

set_work_agent(client, agent)

View Source
@spec set_work_agent(WeChat.Work.client(), WeChat.Work.Agent.t()) :: true