Image Attachment Cache Control

Image Attachment Cache Control 1.0.1

No permission to download

TickTackk

Well-known member
TickTackk submitted a new resource:

Image Attachment Cache Control - Make use of cache-control header tags!

Image Attachment Cache Control for XenForo 2.1.10.2+​

Description​

This add-on allows controlling image attachments cache headers.

Requirements​

  • PHP 7.3+

Options​

Attachments​

NameDescription
Image attachment cache controlConfiguration to control how the image attachment caching would work.
...

Read more about this resource...
 
hello,
any more information anywhere about options or how this can help?

currently running nginx x-accel and memcached but im wondering if this can help speed up image serving somehow.

thank you
 
Currently when serving the attachments, XenForo will add Expires: Thu, 19 Nov 1981 08:52:00 GMT and Cache-control: private, no-cache, max-age=0.

This add-on allows you to change the Cache-control: private, no-cache, max-age=0 to Cache-control: private, max-age=[days selected in in ACP options] or Cache-control: public, max-age=[days selected in in ACP options] depending on what suits your needs and Expires: [request time] + [days selected in ACP options].

The result being loading a thread or any page with large amount of image attachments being very fast as the images will be cached.

(Or at least that is how I expect it to work :P)
 
(Or at least that is how I expect it to work :p)
It's exactly how it works. :D For some of the really heavy image threads at our photography forum the load time for visitors revisiting a page have been dramatically reduced. Sites using a CDN wouldn't be affected but for anybody who (a) allows guests to view attachments [we only allow image attachments so it's not an issue for us] and (b) is serving the attachments from their local server and (c) the size of the attachments can be pretty big then this really helps page load times when revisiting a thread.
 
Nope. This should explain more on the difference between public vs. private.


Are those images viewable by guests?

I just want to confirm. I'm using cloudflare to hide my ip. Should I use private or public if I only allow members to view attachments? Private?
 
As I said, use whatever you would use if you didn't have to hide your IP because your IP is not being "leaked" via this add-on.
 
Hello;

the images are open to guests on my forum, should the plugin settings be like this? How do I check that this plugin is working correctly?
 

Attachments

  • Screenshot_4.webp
    Screenshot_4.webp
    20.6 KB · Views: 37
Hello;

the images are open to guests on my forum, should the plugin settings be like this? How do I check that this plugin is working correctly?
I have the same settings as you because attachments are viewable by guests on my forum too. I have no idea if it's working as intended though.
 
You will need to check the cache-control header of the image attachments and see if they are being updated as expected.

should the plugin settings be like this?
If you are still wondering about public vs. private, please read here and if you still do not understand a thing, go with the default (public).
 
Back
Top Bottom