PlugEtsCache v0.3.0 PlugEtsCache.Store View Source

This module contains functions to get/set cached responses.

Example usage:

conn = %Plug.Conn{request_path: "/test", query_string: ""}

PlugEtsCache.Store.set(conn, "text/plain", "Hello cache")

PlugEtsCache.Store.get(conn) # %{type: "text/plain", value: "Hello cache"}

It’s usually not needed to use these functions directly because the response caching happens in PlugEtsCache.Response and PlugEtsCache.Plug.

Link to this section Summary

Functions

Retrieves eventual cached content based on conn params

Stores conn response data in the cache

Stores conn response data in the cache with specified ttl

Link to this section Functions

Retrieves eventual cached content based on conn params.

Stores conn response data in the cache.

Link to this function set(conn, type, value, ttl) View Source

Stores conn response data in the cache with specified ttl.