On Friday, May 1, 2015 at 8:53:05 AM UTC+2, Joe Barnhart wrote:
>
> I haven't used response.optimize_js and css very much, but I just enabled 
> them on my test site.  As I expected, it took a long time to load my page 
> the first time (around 15 seconds) as web2py concatenated and minimized the 
> files into the temp directory.  But strangely enough, the site only works 
> quickly for a few minutes before taking 15 seconds again to re-minify the 
> same static files.
>
> I checked the temp directory and I can see the files being written 
> whenever the load time takes 15 seconds.  The hashed name does not change, 
> but the file is overwritten and the file date is changed.  This seems like 
> an error.  Is there any other setting I need to make to tell web2py to not 
> re-minimize and re-concat the files again and again?
>
> I'm on web2py 2.10.4 released and running Python 2.7.6.  The files are 
> served thru Apache2 on Debian, if it matters.
>
> I checked the headers and it seems like it is getting a short timeout 
> value of 3600 sec.  Even so, it is refreshing the file in about 60 sec. 
>  Here are the headers from Chrome:
>
>
That's how it has been coded. IMHO static versioning is a far better 
solution, but anyway you can set 

response.cache_includes = (cache_method, time_expire) 

to make the minification last more than the default 5 minutes.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to