I am using cached_content on coworkspace, but interacting with it directly via 
an auth_ajax call. Having a more user friendly way of interacting with it would 
be ace. I have some concern in regards to having post_conten_out checking for 
cached content and returning it, since it might adversely affect things like 
pretty code, depending on how we handle it. I could be surprised though.

On Apr 11, 2013, at 11:32 AM, Matt Read <[email protected]> wrote:

> I've been trying to think of a way to use the cached_content field. My 
> thinking is that I can stored the rendered output of the post content 
> ($post->content_out) in here to avoid triggering all the formatting plugins 
> over and over again, ie. markdown, acronyms, etc..
> 
> The problem I'm having is in the implementation.
> 
> 1. I could implement filter_post_content_out_0 (0 priority to run first), 
> check if there is cached content and return that. The problem is, after 
> returning the cached content, all the the other filters still run, defeating 
> the purpose.
> 
> 2. I could implement filter_post_cached_content_out, and if there is 
> cached_content return it, otherwise return just content_out. The problem here 
> is that all themes need to call $post->cached_content_out, not 
> $post->content_out.
> 
> There is also an issue with "shorttags". I would prefer to still run the 
> shorttag stuff, as the content may be dynamic, and caching it's output not 
> ideal.
> 
> One idea I had was to modify Post::__get() so that when you called the 
> content_out, it would first see if there was cached_content_out 
> ($cached_content = Plugins::filter('posts_content_out', null);) and return 
> that result without running filters (other than shorttag). If there is no 
> result proceed normally with filters. This way, if the plugin doing the 
> caching is deactivated, cached_content_out will return null (even if 
> cached_content field contains data) and go on normally with running filters.
> 
> Second Idea was to allow plugins to stop a filter from running any more. 
> Something like Plugins::deregister('filter', 'post_content_out', $priority);. 
> But this has far greater implications.
> 
> Any thoughts?
> 
> Discuss...
> 
> -- 
> -- 
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to 
> [email protected]
> For more options, visit this group at 
> http://groups.google.com/group/habari-dev
> --- You received this message because you are subscribed to the Google Groups 
> "habari-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev
--- 
You received this message because you are subscribed to the Google Groups 
"habari-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to