Reply To: Ajax Search Pro Invalidating Varnish Cache on Pantheon platform

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Ajax Search Pro Invalidating Varnish Cache on Pantheon platform Reply To: Ajax Search Pro Invalidating Varnish Cache on Pantheon platform

#8787

Ernest Marcinko
Keymaster

Hi!

I think I might know what is causing the problem. In the recent version I integrated a session handler class, which appears to be loading the sessions even when not in use in some cases. I'm working on an update resolving this problem permanently.

If you want, you can try the following temporary solution, although the search override functionality will be disabled as a result.

1. Open up the wp-content\plugins\ajax-search-pro\includes\classes\filters\class-asp-searchoverride.php file and scroll to line 21, which should be empty. Put this statement there:

return $posts;

2. Now open the wp-content\plugins\ajax-search-pro\includes\classes\core\class-asp-manager.php file and scroll to lines 91-92, where you should see this:

            require_once(ASP_CLASSES_PATH . "session/wp-session.inc.php");
            wd_asp()->wp_session = WP_Session::get_instance();

Remove or comment these lines out, so the session handler is not included.

I suspect that this will solve the issue immediately. I have yet to test a different solution on a test environment with varnish cache enabled. Let me know if this changes anything.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)