Caching vbulletin image attachments

Discussion in 'LiteSpeed Cache' started by Yogesh Sarkar, Jun 24, 2013.

  1. Yogesh Sarkar

    Yogesh Sarkar Banned

    Is there a way to cache vbulletin's image attachments in litespeed cache?

    Asking because we run a fairly image heavy forum and these attachments are the ones which cause maximum load.
  2. webizen

    webizen New Member

    are these images served by php or just static file by web server? litespeed cache only works for dynamic response like php. for static file caching, lsws supports by default. see more details below:

    http://www.litespeedtech.com/docs/webserver/config/tuning/#maxCachedFileSize
  3. Yogesh Sarkar

    Yogesh Sarkar Banned

    They are served through PHP, which is why they cause a lot of load.
  4. webizen

    webizen New Member

  5. Yogesh Sarkar

    Yogesh Sarkar Banned

    vBulletin attachments are served through php for two reasons:

    1. Attachments can be stored in the file system or in database.
    2. Attachments access can be limited based on user group and even section based settings i.e. attachments uploaded in threads under LiteSpeed Cache can only be visible to usergroups who have access to this section, while others will get denied message.

    Since this is how vBulletin behaves out of the box, I doubt we can use x-sendfile.

    With respect to using Litespeed cache, will the default vB plugin you guys have, store these attachment requests individually as well?

    Asking because the images aren’t just being served in particular threads, they are embedded in other websites as well and that is what is really causing the load.

    Also does that plugin works with vbulletin 4.2.1 and vbseo 3.6.1?
  6. NiteWave

    NiteWave Administrator

    you can modify the cache rewrite rule, add RewriteCond http-refer

    should work, but with vbseo, the rewrite rule is different.
  7. Yogesh Sarkar

    Yogesh Sarkar Banned

    Any idea the bits that need to be added to the rewrite rules to make it work?

    Alternatively, is there any point in enabling public cache?

    If yes, then how should I configure it to not only benefit my forum, but also other sites hosted on the server?

Share This Page