Active
Project:
IP Geolocation Views & Maps
Version:
7.x-1.25
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Jun 2014 at 15:49 UTC
Updated:
4 Mar 2016 at 04:16 UTC
Jump to comment: Most recent
Comments
Comment #1
e5sego commentedThanks for the hint!
After you enabled Session Cache API you should clear sessions cookie in your browser to make boost work correct.
Here you may find some more info why Boost does not work properly if sessions variables are set.
Comment #2
rdeboerThank you @gge and @e5sego for sharing these pointers!
Rik
Comment #3
sja1 commentedThe session cache api module configuration page requires you to choose one of several alternative different storage mechanisms, one of which is $_SESSION. After reading the thread linked by e5sego, it would seem important to NOT choose $_SESSION as the storage option, and instead choose one of the other alternatives. Is this correct?
Is avoiding breaking Boost the only reason IPGV&M recommends using Session Cache API, or are there other benefits/cases?
+1 for updating the IPGV&M documentation with the information in this thread.
Comment #4
vlooivlerke commentedI finally did it. I turned boost on and it works with:
IPGV&M, Views Accelerator, Session Cache (rdeboer set of great modules) and Domain Access (this module just made things more interesting)
Here follows my nightmarish story.
First of all I was very surprised to see that you only need to tick one box and boost is activated. Here is a tip, if things start looking scary, flip this switch off. I tested boost on my local server but that did not help as my hosting server was setup differently.
First I installed Session Cache and left it on its default settings. I went to my "set location block" and it works 100%.
Then I activated boost. And immediately my "set location block" stopped working and gave an ajax error.
I turned boost off and everything works perfect again.
The fix was to get the correct settings in your .htaccess file. After hours of reading (thanks to domain access module) I found my server specific settings that finally worked.
Now with boost activated and working, I tested my "set location block", the ajax error was gone but it stopped working. (it could not find my address)
Then I started playing with the session cache settings.
Where should user session data be stored? I select "on the server, in $_SESSION memory"
But it gives you this warning "When using Varnish or similar page caching engine for anonymous users, do not use $_SESSION and have a page exclusion strategy in place."
But to get the "set location block" working, I set the session data to be stored on the server, in $_SESSION memory
According to this tread you need session cache otherwise only one page per user session will be cached.
I take it Boost is not similar to Varnish & Memcache.
I have setup a page exclusion strategy as suggested.
First all node/[nid] pages was cached by boost. These pages are not IPGV&M aware.
I excluded all taxonomy/term/* pages from being cached and these views were all using IPGV&M and views Accelerator and responds to the "set my location" block
Preventing caching of any IPGV&M views ensures the "set location" block to work.
Using Views Accelerator to boost these views is a good idea.
I left my setup for a few days to see if boost works and that the pages gets expired.
Then I stumbled upon this very interesting phenomenon.
I have a set of node pages for a city. This city node is cached by boost but it also has a IPGV&M View that is Views Accelerated.
This View shows the latest content created in that city.
http://wikivillage.co.za/sedgefield look at bottom picture cards.
These latest picture cards will show your distance from the node if you are coming from the front page or another page where your location was found via geolocting.
Now since I turned boost on, these picture cards has not updated.
If I edit the city node and update it, boost will expire the cache and create a new html file for the node. This html file will have all the latest content updated from the node, but the IPGV&M View just does not update. If you login and boost is disabled, the view shows as designed "all the latest content for the city"
Could Views Accelerator be preventing the cache of the view to be cleared?
Lets say you visit the city page as an anonymous user and the page is cached and will expire in 20min when cron runs. Now you visit the same page 21min later. You are the first user to visit the page after it has expired. The page will be served to you the same way it gets served for a loged in user where boost is disabled.
Now this first user will give boost the opportunity to cache the page with its new updates. The page does gets cached with the latest updates from the city node, except for the "latest content view that use IPGV&M and views accelerator"
Now I want to talk a little bit of crap.
Could it be... that when the first user visit the uncached city node the cache in views accelerator has not cleared and when boost creates the html page with the old cached settings. Making the view frozen as it never clears its own cache.
Visiting the page as an authenticated user will show the latest content of the city and works perfect.
The same view is also used on the front page that never gets cached and works perfect for anonymous users.
http://wikivillage.co.za Have a look at the picture cards on the front page.
Or should I use a different storage method for the session cache?
Comment #5
vlooivlerke commentedHi Please ignore the last bit..
Clearly I was talking crap. Views accelerator has nothing to do with boost caching.
My problem was entity reference view that got stuck in views cache for anonymous users.
Sorry
Comment #6
rdeboer@vlooivlerke,
No probs. Thanks for the clarification.
Did you end up with a working setup?
Would you like to share it, in bullet points perhaps?
Comment #7
summit commentedHi,
I asked @vlooivlerke on mail this also because I want to use Boost and IP Geolocation Views & Maps together.
Anyone else has experience with this to speed up the website behaviour?
Greetings and thanks for replies in advance,
Martijn
Comment #8
jazzper commentedAn alternative to using Session Cache API is to disable the "Data collection options" which cause the session cookie to be set at: admin/config/system/ip_geoloc. You will loose some functionality but the boost module will generate and serve its pages for anonymous users.