Comments (20)
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.
Nitirques,
Is it normal that the cached file starts with
3385847675....
?
Thank you
from cachelite.
Nitriques,
What I don't understand is why:
example:
- /home/ loads first time + creates cache file
- login on /home/, browser shows the page without caching
- 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.
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:
- You get a 200 response, with cache headers.
- You login and then get a new 200, without cache headers.
- 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.
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.
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.
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.
Your call. But I can't accept this as a solution for everybody.
from cachelite.
of course! 100% right! Contact me on [email protected] if you want to see the system we use..
from cachelite.
What happens if you remove this line
https://github.com/symphonists/cachelite/blob/master/extension.driver.php#L304 ?
from cachelite.
How do you log out ? Via /symphony/logout/ ?
from cachelite.
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.
Hum I am not sure that I fully understand what you are saying
from cachelite.
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.
Wow... This baffles me.
from cachelite.
What about removing L304 AND this part of L308
|| str_replace('"', NULL, stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])) == $etag
from cachelite.
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.
Really weird. Please feel free to try and fit it !
from cachelite.
Well I just reproduced the problem. That's a start !
from cachelite.
👍
from cachelite.
Related Issues (20)
- Possible "duplicates" errors HOT 7
- 2.4 woes HOT 12
- 2.4/2.5 Compatibility HOT 4
- Cachelite with one page HOT 20
- CacheLite prevents viewing ?debug HOT 24
- Delete the 'gzip' branch HOT 1
- Can't flush cache HOT 14
- Doesn't include changes performed by the "HTML5 Doctype" extension. HOT 6
- Unstyled snapshot HOT 8
- Symphony Warning: DOMDocument::loadXML(): AttValue: " or ' expected in Entity, line: 1 HOT 4
- Members extension with frontend CMS HOT 1
- Does not respect the protocol
- Cache Period doesn't work at all HOT 1
- Varchar(255) is not enough
- Update 1.3.3 -> 2.0.0 error Invalid default value for 'timestamp' HOT 7
- Cachelite doesnt work on the default page HOT 7
- Excluded url's not working 100% HOT 3
- Table: sym_cachelite_references is 250MB after some days is this normal? HOT 8
- Update Cache_Lite version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cachelite.