I often have stuff hapening in a hook_init that I only want to happen in GET requests. Messages and redirects etc should often not happen in a POST request. They should also not happen in the admin menu XHR request, which is a GET.

If it were a POST request, I didn't have to check method and URL...

(Don't start about REST, because it's not REST anyway. Let's not pretend we're going for semantic perfection.)

Comments

sun’s picture

POST requests skip caching at various layers in the first place, so that's not an option.

rudiedirkx’s picture

The admin menu's HTML caching? Yeah, that makes sense.

I also read something, somewhere about caching the admin menu client side..? How's progress on that? (I can't find an issue for that.)

sun’s picture

The client-side caching is what defines the 3.x product line (among other architectural changes).

sun’s picture

Status: Active » Closed (won't fix)

I'm sorry, but I don't see why this should be changed, and even more importantly, why you'd want to do something in hook_init() whenever the admin menu is pulled.

rudiedirkx’s picture

You said that a month ago =) I agreed/surrendered.