New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Dynamic Fragmentation #222
Comments
@jaswsinc Just thinking aloud here.. I wonder if it would be possible to dynamically load an entire WordPress plugin using Javascript, without changing anything about how the plugin itself works... I'm thinking something like I suppose the issue there would be that WordPress would've already loaded and stopped (as it's a server-side PHP app), which means that the |
Right. I agree that's worth considering. Another thing to consider, along the same line; is a Web Socket to achieve this. Although, in both cases we'd be loading WP a second or third or fourth time; whereas with |
In which case it would probably be faster for the site owner to just exclude that page from the cache entirely... |
I was just playing a bit with this, and another problem that I see now is related to the WP query itself. Ideally, we would want to avoid allowing the WP query to take place yet again, whenever we serve the cache back out. In other words, when we reparse the excluded portions of the page (i.e. the dynamic parts), we'd probably want to do that around the However, if whatever is running dynamically needs anything that might be directly or indirectly related to the current Post/Page/View/etc; none of that will be available as expected. In short, whatever would run in this phase would need to be independent from WP; more or less. Otherwise, QC would need to wait for all plugins to initialize, then wait for WP to make the query; and then parse back out the dynamic portions that were excluded. That would defeat the purpose of caching it to begin with. As @raamdev mentioned before, might as well just exclude the entire page in this case. Hmmm.. |
+1 to this feature being added Having some sort of way to either exclude content from being cached -- or even specifying that certain content should have a shorter expiry time -- would be pretty useful for things like "random posts" (presumably you'd want this excluded from caching... or set to a short expiry time to ensure it changes often) or "top posts" widgets (which would benefit from something like a once-per-day expiry). |
I've a site that displays relative timing (e.g. "5 min ago"). It'd be great to be able to exclude those parts from cache. |
My website use a "recent posts" and a "recent comments" widget. They need to be up-to-date ; but deleting the whole cache after each comment would create a lot of overhead. Partial caching allowing me to exclude these widget would help a lot. If the content of these widget could be separately cached and pulled together at request time it would be even better. |
I have created custom sharing buttons for my site, with shares counter. I would be great if those counter can update dynamically, when someone like the post. |
@joe8104 A better way of handling dynamic updates like that would be to use JavaScript, that way your sharing buttons will work with any caching plugin. :-) Thanks for adding your +1 to this feature request. 😄 |
woocommerce recently viewed products also need some exclusion from caching. any idea how to exclude? |
Dynamic Fragmentation would allow a site owner to specify dynamic portions of a page that should not be cached and which should always be loaded dynamically, similar to how WP Super Cache and W3TC use
mfunc
andmclude
.@jaswsinc's thoughts on this topic, forked from #56:
An idea from @jaswsinc:
The text was updated successfully, but these errors were encountered: