Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.48 KB

README.md

File metadata and controls

39 lines (29 loc) · 1.48 KB

TeslaCache

Build Status Coverage Status codecov Module Version Hex Docs Total Download License Last Updated

TeslaCache is a Basic Cache Middleware for Tesla. It will cache only GET requests for X milliseconds.

Installation

Add :tesla_cache to your list of dependencies in mix.exs:

def deps do
  [
    {:tesla_cache, "~> 1.1.0"}
  ]
end

Usage

defmodule GoogleClient do
  use Tesla

  plug Tesla.Middleware.Cache, ttl: :timer.seconds(2)
end

License

The source code is under the MIT License. Copyright (c) 2017- Emerson Macedo.