Hey,

I think you 
want 
https://metacpan.org/source/LDIDRY/Mojolicious-Plugin-StaticCache-0.01/lib/Mojolicious/Plugin/StaticCache.pm#L15
 
to be this:

if ($mode ne 'development' || $even_in_dev) {

And I think I would store $mode and $even_in_dev outside of the 
"after_static" hook.


On Thursday, June 22, 2017 at 10:58:03 AM UTC+2, Luc Didry wrote:
>
> Hello, 
>
> As discussed on the "Wishlist thread (fourth edition)"[1], I made a 
> Mojolicious 
> Plugin which add Cache-Control header on served static files in production 
> (the 
> header is not added in development mode): 
> https://metacpan.org/pod/Mojolicious::Plugin::StaticCache 
>
> It's basic and has very few options but it does the job. 
>
> The code is on https://framagit.org/luc/mojolicious-plugin-staticcache 
> and 
> issues should be opened on 
> https://framagit.org/luc/mojolicious-plugin-staticcache/issues. 
>
> (if you don't have a framagit.org account, you can use Github 
> authentication to 
> get one in a few clicks). 
>
> Comments and code contribution are welcome 🙂 
>
> [1] 
> https://groups.google.com/forum/#!searchin/mojolicious/wishlist|sort:relevance/mojolicious/JLZlJwkm0Ho/mFE8CFIcAAAJ
>  
> -- 
> Luc 
> https://fiat-tux.fr/ 
> https://luc.frama.io/ 
> Internet n'est pas compliqué, Internet est ce que vous en faites. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to