PLEASE HELP -> PHP PAGE CACHE + SESSION (LOGIN/LOGOUT)

Discussion in 'PHP' started by n00bl3t, Apr 19, 2013.

  1. #1
    Hello,

    I just implemented this page caching tutorial:

    http://www.catswhocode.com/blog/how-to-create-a-simple-and-efficient-php-cache

    It works so good... but my problem now is with login... how do I re-validate or delete cache page when user login or logout?
     
    n00bl3t, Apr 19, 2013 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    So you are caching ALL pages? and why did you add caching to your site? please give more details.
     
    EricBruggema, Apr 19, 2013 IP
  3. n00bl3t

    n00bl3t Well-Known Member

    Messages:
    383
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    120
    #3
    because it is killing my server... and gtmetrix also recommends it...

    there are times when the page loads in 29+ seconds... (which is crazy)

    but mostly 3seconds... when page cache is not enabled...

    but it is always around 3seconds when I enable page cache.. but I cannot login or logout... until the cached page is expired...
     
    n00bl3t, Apr 19, 2013 IP
  4. n00bl3t

    n00bl3t Well-Known Member

    Messages:
    383
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    120
    #4
    Any body?
     
    n00bl3t, Apr 20, 2013 IP
  5. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #5
    Then i rather think you should check out your queries instead of starting to cache... but tell us what do you do to get that much loading time? loading external url? big queries? etc? we need much more info!
     
    EricBruggema, Apr 20, 2013 IP
  6. n00bl3t

    n00bl3t Well-Known Member

    Messages:
    383
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    120
    #6
    well actually.. i purchased a script... so yeah i did not do the coding..
     
    n00bl3t, Apr 21, 2013 IP
  7. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #7
    I see, and did you contact the author? to find out why the script loads that long? mostly it are queries that haven't been optimised! If you wish i can take a look for you, PM me for more help!
     
    EricBruggema, Apr 21, 2013 IP