|  | Posted by naixn on 12/02/06 19:24 
Martien van Wanrooij wrote :>
 > "naixn" <naixn@won-fma.com> schreef in bericht
 > news:4571ccff$0$24440$79c14f64@nan-newsreader-05.noos.net...
 >> But there's another solution : you can, on the page that displays the
 >> dates,
 >> check the last modification time of the HTML cache file, and if it was
 >> modified before one day ago, you update the cache ( by doing the SQL
 >> request ),
 >> and then display the cache file ( since it has been updated... :D ).
 > Thanks this is a wonderful suggestion. My hosting provider gives me the
 > right to give writing access to certain folders and I guess that in
 > rough lines, caching means: writing data to a file on the server when a
 > request is made from a client?
 >> That would give you : one SQL request a day. Not so many, eh? :)
 > Enough info to study the topic seriously,  one more question. You say,
 > with a smiley though, one SQL request a day so it could mean that the
 > very first visitor tonight at 0:00  generates a SQL request and that
 > request writes "something" to the caching file , when the second visitor
 > shows up at 0:05, he get his data from that recently update file? Sorry
 > to ask it in such a simplified way but with all due respect to all these
 > wonderful cms'es I want to understand the topic as thoroughly as possible.
 >
 > Martien
 
 Yep that's quite it. To simplify :
 You get your site working.
 Someone arrives on the page at 10 AM.
 There is no file where datas where cached
 -> Your system queries the database, and write the adequate HTML depending on
 the result into a file, as it would usually output.
 Your system include the cache file, meaning it outputs the db results.
 Another ppl arrives on the page at 11.05 AM.
 A cache file exists.
 It's modification time is less than one day
 No update needed
 Include the cache file.
 [...]
 Some guy arrives on the page at 10.30 AM the day after.
 A cache file exists.
 But it was modified more than 24h ago.
 -> Your system query the database...
 Include cache file.
 etc.
 
 A cache file is no more than a text/html file in which you write the desired
 HTML output.
 
 --
 Naixn
 http://fma-fr.net
  Navigation: [Reply to this message] |