Skip to content

emerleite/tesla_cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

CacheX middleware for Elixir Tesla HTTP Client

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages