caching - How can I cache (cache on my server) a site like Stackoverflow written in PHP -
i have tried make own practice , finished basics. have never cached more javascript , css before. have tried searching , google cant clear on following questions.
i want know pages should cached on server. i.e should cache page questions/45/title-goes-here?
how cache header part if username different everyone?
do dump whole file text file every single question? doesn't seem practical.
how set cache page used button.
sorry if answers obvious, have researched , dont it.
thanks
your caching system set of tools quick lookups on things "expensive" generate , don't change much.
to determine should cached, need study work far , figure out parts taking cpu or database time. , cache those.
for caching stackoverflow, perhaps 1 strategy might generate cache object html of each question, including s populated afterwards using javascript. process of looking question , tags might more time consuming looking single cache entry includes both.
for header, that's candidate javascript, long don't mind skipping graceful degradation of user interface. cached username section of header might like:
<div id="username"></div>
then javascript, generated not cached, "fill in blanks" personalized content.
hope helps.
Comments
Post a Comment