Designed for anonymous and cache?
Sutharsan - January 15, 2009 - 15:22
| Project: | Session Favorites |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
Is session favorites module designed to work with anonymous users and cached pages? I have several problems with the module that may have started when I turned caching on. For example the page listing the personal favorites is cached. After I forced caching off in _session_favorites_page() the page is no longer in {cache_page}.

#1
I have been able to add the required code to get session_favorites working (better) with anonymous users. A patch is attached.
The addition of
$GLOBALS['conf']['cache'] = FALSE;looks a bit hacky to me, but it sure works to prevent caching of the favorites page.#2
Thanks Sutharsan. The idea of the patch sounds great, but the attached patch appears to be for UI/javascript-related changes. Am I missing something?
#3
The patch does two things: the above mentioned prevention of caching and it adds an Ajax call upon page load calling favorit_path/js/get that updates the favorit link based on the node's favorit status.