Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5984693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:24:56+00:00 2026-05-22T22:24:56+00:00

At the moment I’m working on a system that caches dynamically created files, nothing

  • 0

At the moment I’m working on a system that caches dynamically created files, nothing too new there. Basically how it works is that it will go through the $_GET array and will create a directory structure based on querystring variables. Off course it’s a little more secure than that, but you get the picture.

The problem with this is that anyone could surf to for example:

http://www.example.com/?page=foo&page2=bar (which would generate /cachefiles/foo/bar.html)

and change the page2 value randomly each time, thus creating a new cachefile.
So someone could just make 10000 requests with random querystrings and there would be new cachefiles generated for each and every single one of them.

An extra problem is that I actually want to allow this in a way, as it’ will be part of a CMS which people should be able to write plugins for and thus use their own querystring variables. As the querystrings are usually vital to the content of the page, there should be a new chachefile for different querystrings.

So basically I want to allow the use of querystrings in this context, but prevent abuse of them.

To me it sounds rather impossible to have one but not the other, but as I’m no guru I’m hoping some of you could perhaps share your thoughts on this and adice on best practises (and / or alternative methods).

I do know there’s a few cache libraries out there, but I prefer to do things on my own so I understand what’s going on and how stuff works.

EDIT: Thanks for your replies everyone. I think I will try to combine some of your suggestions into one system. So I will add the functionality for plugin developers to register their querystring variables into the API, as well as do some more profound checks. However, please consider following scenario:

User requests a static page, but in the template of it a plugin-calendar is loaded: eg. example.com/?page1=static&calenderStartmonth=5
Here’s the root of the problem: calendarStartMonth can be one of 12 and does need to be able to change, so caching would need to re-occur every time calendarStartMonth changes. If the plugin developer does not check the input, and someone uses a random nr for 10000 requests, that would overflow the cache, would it not? Off course I realise it’s not very effective to cache the page again everytime the calenderMonth changes, that’s why I asked for some best practice advice. Would I have to come up with a system which caches all but the plugins? Thanks again for your answers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:24:57+00:00Added an answer on May 22, 2026 at 10:24 pm

    I would recommend you write some small API to let the CMS and the plugin developers register pages in the database they are going to create (read: allow).

    This way you also solve the problem of cache-flushing as you really know what is about to be deleted and when.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At the moment my code (PHP) has too many SQL queries in it. eg...
At the moment I am working on a project admin application in C# 3.5
At the moment I have a set of divs, generated dynamically by php and
At this moment, I am the only person working on a project in svn.
At the moment I'm working with a team on a Play! Framework app. With
At the moment we use HSQLDB as an embedded database, but we search for
At the moment, I'm creating an XML file in Java and displaying it in
At the moment, our application uses the Trident Win32 component, but we want to
At the moment I use PHP for almost everything I develop for the Web
At the moment I have setup a custom ok cancel dialog with a drop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.