[wp-hackers] Long Polling, Ajax and WordPress
hempsworth at gmail.com
Tue Nov 1 15:10:47 UTC 2011
Thanks all for your advice.
Id love to explore a static cache in the form of an XML file, updated
only when new items are added, but there may be issues.
I have two 'lists' that will need to have live updating enabled on.
The one is the simple DB results I posted before. This is basically
asking 'have any posts been added since I last checked', however wont
this be different for whoever is logged in at that time? (I have no
logged-out users). That is to say, user A may have seen the new post,
and the cache is purged/updated, but user B hasn't had 'their' list
The second 'list' might be a tad trickier. It's more like a Facebook
activity stream, which will aggregate different post types and
comments based on whether they have anything to do with the current
Because this will be dynamic from one person to the next, how would I
go about caching this (or any part of the jigsaw?)
Maybe I'm missing something obvious, as I'm quiet inexperienced when
it comes to caching etc.
Many thanks for your help,
Sent from my iPhone
On 1 Nov 2011, at 14:30, Hal Burgiss <hal at burgiss.net> wrote:
> On Tue, Nov 1, 2011 at 9:46 AM, Dagan Henderson <
> Dagan.Henderson at epyllion.com> wrote:
>>> A different take on this ... since it seems to me a heavy handed use of
>> resources if there is significant traffic, and the data could be cached
>> (although a very short lived cache), and that way you don't have
>> potentially many clients running the same query every few seconds. So, I
>> would think about a shell script that builds the cache server side:
>> Rather than a long-running shell script (which violates some hosting
>> provider TOS and requires SSH access), why not hook into 'edit_post,'
>> which is called for comments and post edits alike?
> Better, yes! That way cache is rebuilt only as needed.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers