Plug_cache_control - A plug + helpers to set and manipulate cache_control headers

Hello everyone,

I wrote a small library called plug_cache_control to serve as a convenience when working with response cache_control headers. Maybe you already got it from the name but the library exposes a plug but not only. A few helper functions are also there. You can find more about them and the plug in the documentation.

I’ll be happy to answer questions and don’t hesitate to file issues and propose changes.

2 Likes

Thanks for contributing, will probably use :slight_smile:

One small note about naming: library guidelines discourage using the same base module name of another library to avoid name clashes in case the other library adds some features. And I’d expect Plug.CacheControl to be part of the Plug package. Maybe PlugCacheControl without the dot is a good alternative?

Yes, you’re right. Such change would also unnest the directory structure a little. Thanks for the suggestion!

1 Like

Version 0.2.0

Changed Plug.CacheControl to PlugCacheControl so it’s clear the library doesn’t belong to the official Plug packages.

2 Likes

Neat, I could use that.

Your docs link is broken btw.

1 Like

Thanks, the link is fixed.