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...
 

Iggy

Well-known member
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
 

TickTackk

Well-known member
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)
 

Kevin

Well-known member
(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.
 

gogo

Active member
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?
 

TickTackk

Well-known member
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.
 

MattW

Well-known member
I've got this installed, but I'm not seeing the headers being changed for attachments

1608019479018.png

1608019496907.png
 
Top