Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Fatal error: Call to undefined function drupal_map_assoc() in /sites/all/modules/authcache/authcache.module on line 700
https://drupal.org/project/shurly
how can i use certain rules to exclude all the urls by shurly, is there a function or hook to do this?
Comments
Comment #1
simg CreditAttribution: simg commentedI need to familiarise myself with Authcache 7.x-2.x but in previous versions there was a textbox on the config page that let you specify urls (and I think patterns of urls) to not cache ?
Comment #2
funature CreditAttribution: funature commentedyes, you are right. but the shurly module creates short urls like www.example.com/xyz without any prefix. that means, i can not block those links in the setting form with pattern. there are thousands of them, it is of course not possible to add them to the list one by one.
Comment #3
simg CreditAttribution: simg commentedhmm, good point.
from memory (it's been a while since I've worked on Authcache) there's a global variable called _authcache_is_cacheable. You could try having a module set this variable when you don't want to cache. There's also a function called authcache_is_cacheable which you could "hack" to do what you need.
There really needs to be a better solution than this (and maybe there already is, but I don't have time to look into it right now). A hook would certainly be a worthwhile enhancement.
Comment #4
simg CreditAttribution: simg commented>There probably already is
There is ! https://drupal.org/node/1904316
Comment #5
funature CreditAttribution: funature commentedthanks, i tried this with no success, finally i found out because the redirect happens already in shurly_boot(), so i added drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); then it works. but i'm not sure if there is a disadvantage to do like this
Comment #6
znerol CreditAttribution: znerol commented@funature: Thanks for your investigations. There is an
hook_exit
invocation inshurly_goto
. At this point Drupal is not yet fully booted because the latter function is called from withinshurly_boot
.I think that I need to rewrite
authcache_exit
in such a way, that it also works with lower bootstrapping phases.Comment #7
znerol CreditAttribution: znerol commentedFix committed in 489f572, let's see whether the test results turn to green again...
Comment #8
funature CreditAttribution: funature commentedthanks, it works great.