Check your memcache/apc to see if it works?Hmmm still doesnt appear to be caching them. Cache hit ratio for today = 0%
# Turn on Expires and set default to 0
ExpiresActive On
ExpiresDefault A0
<filesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
ExpiresDefault A29030400
Header append Cache-Control "public"
</filesMatch>
<filesMatch "\.(gif|jpg|jpeg|png|swf)$">
ExpiresDefault A29030400
Header append Cache-Control "public"
</filesMatch>
<filesMatch "\.(xml|txt|html|js|css)$">
ExpiresDefault A604800
Header append Cache-Control "proxy-revalidate"
</filesMatch>
<filesMatch "\.(php|cgi|pl|htm)$">
ExpiresActive Off
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</filesMatch>
Good pickup. max-age is the preferred method over expires, even better to use both.
Add
to bothPHP:$this->_response->setHeader('Cache-Control', 'max-age=2592000', true);
library/Tinhte/AttachImageOptimization/ViewPublic/Attachment/View.php
and
library/Tinhte/AttachImageOptimization/ViewPublic/Attachment/View304.php
$this->_response->setHeader('Cache-Control', 'public', true);
$this->_response->setHeader('Cache-Control', 'public, max-age=2592000', true);
<filesMatch "\.(php|cgi|pl|htm)$">
ExpiresActive Off
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</filesMatch>
I asked my host about APC caching today and this is what they got back to me with:
"Your scripts may support a filesystem based cache which you could enable, however anything alone the lines of APC caching would require a VPS server."
I'm on shared hosting now. Is there any way to get the caching benefit of the add-on without APC? I'm been hunting EVERYWHERE to find an add-on that keeps pictures from re-loading in quotes.
Whelp, I decided to try it and see if it would work without the ACP being installed. It doesn't. I haz a sad.
Check that, seems it might be working after all. But does it only work for images users have uploaded from their computers and not the IMG bbcode tag?
Also, how about when opening the link inside the quote - any other options there than opening the image in the browser separate of the thread?
I'm unsure of the usefulness this has in 1.2
With it disabled:
Timing: 0.0880 seconds Memory: 17.885 MB DB Queries: 16
With this enabled:
Timing: 0.0979 seconds Memory: 18.024 MB DB Queries: 16
http://www.sociallyuncensored.eu/forums/threads/photo-test.16655/
For now, I'll keep it disabled.
The queries that were saved is in the /attachments requests, not in the /threads requests...
Still added time and memory in the /thread request so....
If you can show me saving..... That can be easily verified.
The CDN part of this still doesn't work either, because you still have the path wrong.
I asked my host about APC caching today and this is what they got back to me with:
"Your scripts may support a filesystem based cache which you could enable, however anything alone the lines of APC caching would require a VPS server."
I'm on shared hosting now. Is there any way to get the caching benefit of the add-on without APC? I'm been hunting EVERYWHERE to find an add-on that keeps pictures from re-loading in quotes.
Doesn't matter. Like others, I uninstalled this.You could not see how it is saving you by looking at the queries because /attachments stats not be shown in there. On another hand, it could help you to show attached images to unregistered members or show in quote...
The CDN part of this still doesn't work either, because you still have the path wrong.
We use essential cookies to make this site work, and optional cookies to enhance your experience.