SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast weicool's Avatar
    Join Date
    Jul 2004
    Location
    USA
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    "Caching" Database Generated Page

    How can I turn PHP pages generated from a MySQL database into static, "cached" pages? I plan on setting up a database with a bunch of information that occasionally changes and displayed through several hundred pages. However, I don't want to query the database every time a page is requested. What's the best way to do all queries once, generate static pages, and be able to occasionally refresh the caches when I update the database?
    Pokemon Dream - The greatest Pokemon website of all...

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    fopen()/fwrite() to write out your static files. What part do you need help with?

  3. #3
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are existing tools, like http://danga.com/memcached/.

    Although, MySQL query cache is ideally suited for seldom-write systems.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •