in hook_boot(), there is a session assignment

$_SESSION['ip_country_code'] = !empty($country_code) ? $country_code : variable_get('country_specific_nodes_def_cn', 'IN');

While on one hand, the session assignment is good as it avoids queries to determine the country on subsequent request, the session assignment causes a cookie to be sent by drupal for all users (especially anonymous).
This breaks varnish caching.

There are two issues to be handled:
1. avoid usage of sessions so that varnish can work nicely
2. have alternate ways of determining country. This, again, comes into effect only with varnish, as the IP is now the varnish server ip address.

Comments

alansaviolobo created an issue. See original summary.

cmak’s picture

Assigned: Unassigned » cmak
Status: Active » Needs work
pramod_patil’s picture

Assigned: cmak » pramod_patil
cmak’s picture

Assigned: pramod_patil » Unassigned
cmak’s picture