Mod Archive Forums Mod Archive Forums
Advanced search  

News:

Please note: Your main modarchive.org account will not work here, you must create a forum account to post on the forums.

Pages: [1]   Go Down

Author Topic: Cache control  (Read 219 times)

0 Members and 1 Guest are viewing this topic.

JackAsser

  • Liking the Pie
  • Offline Offline
  • Posts: 3
    • View Profile
Cache control
« on: April 14, 2017, 21:30:35 »

Currently putting an Amazon cloudfront proxy in front of ModArchive to speed up search-as-you-type kind of queries.

Just notices though that the download-api do not set cache headers properly, you might wanna do that. F.e. set the expiry using the mtime of the file downloaded.

I'll simply enforce TTL to a week for all downloaded objects for now.
Logged

JackAsser

  • Liking the Pie
  • Offline Offline
  • Posts: 3
    • View Profile
Re: Cache control
« Reply #1 on: April 14, 2017, 21:31:32 »

For info you return this all request. While it's sensible on xml-tools.php it's not very efficient on downloads.php

  Expires: 0
  Cache-Control: must-revalidate
Logged

Saga Musix

  • TMA Moderator
  • Lerd of the Pies
  • ****
  • Offline Offline
  • Posts: 1924
  • I love OpenMPT! And Modules! And TMA! And Pie! :>
    • View Profile
    • Saga Musix - free mod music and more!
Re: Cache control
« Reply #2 on: April 15, 2017, 17:52:29 »

I will look into it after this weekend. Please remind me if this is still not implemented within a week. :)
Logged
» My TMA artist profile
» Visit my music site: https://sagamusix.de/ [de, en]
» Visit my programming website: https://sagagames.de/ [de]
» Open ModPlug tracker

Saga Musix

  • TMA Moderator
  • Lerd of the Pies
  • ****
  • Offline Offline
  • Posts: 1924
  • I love OpenMPT! And Modules! And TMA! And Pie! :>
    • View Profile
    • Saga Musix - free mod music and more!
Re: Cache control
« Reply #3 on: April 20, 2017, 18:52:20 »

Can you check if the headers are set up in a way that is useful to you now?
Logged
» My TMA artist profile
» Visit my music site: https://sagamusix.de/ [de, en]
» Visit my programming website: https://sagagames.de/ [de]
» Open ModPlug tracker
Pages: [1]   Go Up