I found an interesting workaround for an issue I was having; not sure if it's best-practice, but I was wondering if someone could explain to me how this works:
- I needed to provide a check on postdispatch for a category load
- Created an observer, inspect the
- If the category matches the category in question, I do some
getStoreConfiginspection to a custom module, and based on the return, I either do nothing (let the request sail through) or redirect to another page
What I found is that with Enterprise Full Page Cache enabled, my postdispatch event was never firing.
Which raises the question:
In my custom module's controller I created a new action which effectively just calls
$this->_forward() to the category as before. But now, instead of FPC intercepting my event, the event is fired correctly.
Is this poor practice?
Is there a better suggested workaround?
It seems less "hacky" than fully disabling FPC for the category in question... though that may have been the actual result of the
_forward. The end-user experience is seamless and all category features work as-expected from there including pagination, layered navigation.