SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Evangelist
    Join Date
    Aug 2010
    Posts
    503
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Add Caching to Site

    Hi all, my site doen't seem to be caching at all - if I click from the list page onto a product page and then go back, the list page is reloaded all over again - I'm guessing this probably isn't a good practice...what would be the best thing to do? Any help, advice or pointers are appreciated as always

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,747
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    I'm not a caching expert... in fact dont believe it to be beneficial for any but the most heavily trafficked sites in the world... but to help those that are, I will respond.

    "It doesnt work"... doesnt help us help you.
    We cant magically see your code to see why it isnt working. You need to show it to us.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  3. #3
    SitePoint Evangelist
    Join Date
    Aug 2010
    Posts
    503
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi StarLion, sounds as though it's probably not worth my while implementing a cache system then. The site is bloody quick as it is but I'm just being greedy on speed. I didn't know if this was usual practice for the page to completely reload when a user goes back. Just a very casual question.

  4. #4
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,747
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    Eh... unless you're using a VERY heavy set of queries, or pounding it with a lot of traffic, the amount of time saved with caching would be insignificant.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  5. #5
    SitePoint Evangelist
    Join Date
    Aug 2010
    Posts
    503
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well the site loads pretty quickly, I'm perfectly happy with it, just done a speed test and it says it loads 1.42secs - that ok?

  6. #6
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,747
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    What connection speed is that at?
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  7. #7
    SitePoint Wizard TheRedDevil's Avatar
    Join Date
    Sep 2004
    Location
    Norway
    Posts
    1,188
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I don't know what caching you are looking to implement, but from the sentence it sounds like you want to apply it on the images, css and html. To do that you will need to add the expire times when they are pulled. I.e. Telling the browser that image A is valid for one week from today, that way the browser wont check for an update before a weeks time.

    If you want to learn more about content caching, I strongly recommend these two books by O'Reilly.
    High Performance Web Sites
    Even Faster Web Sites

    If you are talking about server side, look into APC or Memcache.

    Quote Originally Posted by StarLion View Post
    I'm not a caching expert... in fact dont believe it to be beneficial for any but the most heavily trafficked sites in the world... but to help those that are, I will respond.
    I don't know if your in the web development business, but if you are I strongly suggest that you look into caching again. Caching is simple, easy to implement and beneficial even for smaller websites.

    I wont go on about the topic, as there is a lot of different cache methods, systems and approaches all depending on what you want to cache. The important part however is as normal tied down to money, with the system cached, you save server resources (more websites per server for example if its smaller websites), using less bandwidth and so on.

  8. #8
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,747
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TheRedDevil View Post
    I don't know if your in the web development business, but if you are I strongly suggest that you look into caching again. Caching is simple, easy to implement and beneficial even for smaller websites.
    Apparantly I need to read again, because I dont really see the need for caching on small scale sites at all - if you'll never tax your server, or approach it's bandwidth limits.....
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.


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
  •