Git Product home page Git Product logo

Comments (20)

nitriques avatar nitriques commented on July 17, 2024

The problem raises after logging out (post to symphony/logout/), we still get the frontend cms loaded on some pages.. so we need to login again and flush=site in order to have the cache recreated..

This is "normal". Cachelite sends HTTP headers that tell the browser to cache things locally. When you log out, the browser reverts back to those and gets a 304 from the server, which confuses things. I've never been able to fix this...

Everything works perfect without the cachelite extension, but we really need caching.
Problem happens on localhost and on server, in the logs i see:
[Tue Mar 31 18:06:53.091130 2015] [proxy_fcgi:error] [pid 11550:tid 139803965888256] [client 85.247.208.69:58574] AH01070: Error parsing script headers

Never saw this... maybe it's a problem on your setup ? http://serverfault.com/questions/421398/apache-php-fpm-random-error-parsing-script-headers-seg-faults

cannot be recreated..

Hum this is strange. But since I can't reproduce it, I do not know what to do.

from cachelite.

wdebusschere avatar wdebusschere commented on July 17, 2024

Nitirques,
Is it normal that the cached file starts with
3385847675....

?
Thank you

from cachelite.

wdebusschere avatar wdebusschere commented on July 17, 2024

Nitriques,
What I don't understand is why:
example:

  1. /home/ loads first time + creates cache file
  2. login on /home/, browser shows the page without caching
  3. logout and browser shows still the logged in version.. while there is a cached version why? how is this possible, i check if logged in, and the author is not logged in, but i get the loggedin version..

thx

from cachelite.

nitriques avatar nitriques commented on July 17, 2024

Is it normal that the cached file starts with

Yes it is. It's there to check for data validity: See https://github.com/symphonists/cachelite/blob/master/lib/class.cachelite.php#L793

logout and browser shows still the logged in version.. while there is a cached version why?

Like I already told you:

Cachelite sends HTTP headers that tell the browser to cache things locally. When you log out, the browser reverts back to those and gets a 304 from the server, which confuses things. I've never been able to fix this...

I other words:

  1. You get a 200 response, with cache headers.
  2. You login and then get a new 200, without cache headers.
  3. Somehow, after you log in, since you are requesting a page that has been cached (in step 1), the browser sends the cache header. Then the server responds with a 304 and the browser displays the result gotten from step 2.

Is it possible to fix.

Maybe! Browser level caching is really hard to get right. Cross-browser level caching is even harder and that's what we are trying to do. If you can find a fix, I would be happy to test it/review it.

BTW, How do you log the user in ? With a post to /symphony/login/ ?

from cachelite.

wdebusschere avatar wdebusschere commented on July 17, 2024

Nitriques,
Thank you for the explanation.
Login with a post to /symphony/login/ indeed.

I will dig a bit deeper.. a solution would be to be able to disable caching for the IP's of the author.
Extension is great, and a must for our african visitors/clients

Wannes

from cachelite.

nitriques avatar nitriques commented on July 17, 2024

a solution would be to be able to disable caching for the IP's of the author.

I would not do that, especially for Africa. Multiple person can share the same IP.

from cachelite.

wdebusschere avatar wdebusschere commented on July 17, 2024

Nitriques,
yes, but better to offer 95% of the visitors caching then 0%.
Now we need to disable caching, because it's confusing for the admin of the website to see cms elements (that don't work) after logging out.

from cachelite.

nitriques avatar nitriques commented on July 17, 2024

Your call. But I can't accept this as a solution for everybody.

from cachelite.

wdebusschere avatar wdebusschere commented on July 17, 2024

of course! 100% right! Contact me on [email protected] if you want to see the system we use..

from cachelite.

nitriques avatar nitriques commented on July 17, 2024

What happens if you remove this line

https://github.com/symphonists/cachelite/blob/master/extension.driver.php#L304 ?

from cachelite.

nitriques avatar nitriques commented on July 17, 2024

How do you log out ? Via /symphony/logout/ ?

from cachelite.

wdebusschere avatar wdebusschere commented on July 17, 2024

With https://github.com/symphonists/cachelite/blob/master/extension.driver.php#L304 ?
After begin logged-in the pages with a cachefile have the cached version loaded, untill i refresh a few timers they get the cms elements.. :(
After loging out i get the cached version and no cms elements :)
Logout is via /symphony/logout/ link..

from cachelite.

nitriques avatar nitriques commented on July 17, 2024

Hum I am not sure that I fully understand what you are saying

from cachelite.

wdebusschere avatar wdebusschere commented on July 17, 2024

With L304 commented:

  • After login: the pages have the cached version loaded and not the page with new cms elements :(
  • After logout: cached version: OK

Without L304 commented:

  • After login: the pages have the cms elements loaded: OK
  • After logout: the pages have still the cms elements loaded :(

from cachelite.

nitriques avatar nitriques commented on July 17, 2024

Wow... This baffles me.

from cachelite.

nitriques avatar nitriques commented on July 17, 2024

What about removing L304 AND this part of L308

|| str_replace('"', NULL, stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])) == $etag

from cachelite.

wdebusschere avatar wdebusschere commented on July 17, 2024

Same problem, after login I need to press F5 several times to get the CMS elements, clicking several times on the page link to refresh doesn't help..

from cachelite.

nitriques avatar nitriques commented on July 17, 2024

Really weird. Please feel free to try and fit it !

from cachelite.

nitriques avatar nitriques commented on July 17, 2024

Well I just reproduced the problem. That's a start !

from cachelite.

wdebusschere avatar wdebusschere commented on July 17, 2024

👍

from cachelite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.