#1 December 16, 2014 4:27pm

jesse.glaves
Member
Registered: June 28, 2014
Posts: 124

Admin bar missing on cached pages

We just launched our site and turned on site caching in the environment.php file to help with the full load of the site being in production. It works really well to reduce page load times, but the admin bar seems to be missing on cached pages when users are logged into the site. It's not a huge deal, as I can just click around until I find a page that isn't cached. However I doubt that's the desired performance. To verify, I turned caching off and the bar came back immediately. There ought to be a way to get around this behavior. Any ideas?

Offline

#2 December 16, 2014 7:08pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Admin bar missing on cached pages

The BigTree bar doesn't function very well with caching turned on because it rewrites the closing </body> tag to add the javascript to draw the page. This occurs in the router.php file near the end (after routing is complete and the page is drawn).

It's possible to move that functionality into /site/index.php to load even when pages are cached, but I'd have to do some testing to give you a solid script to use on a live site. We generally don't turn caching on unless we're expecting A LOT of traffic (we host ~10 large university levels per dedicated server running BigTree without needing caching).

Let me know if you'd like a modified index.php, and just to confirm you're on 4.1?

Offline

#3 December 16, 2014 7:33pm

jesse.glaves
Member
Registered: June 28, 2014
Posts: 124

Re: Admin bar missing on cached pages

Nope, I doubt we'll ever have spikes like that unless it's a dos attack or something. But I think we have firewall settings in place to deal with requests like that. I just figured it was best practice, but if you don't even use it with your larger sites, I definitely don't think we'll have any issues leaving it off. Thanks.

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.