[wp-hackers] Transient Size/Performance
Braydon
ronin at braydon.com
Wed Aug 31 01:52:34 UTC 2011
On 08/30/2011 05:01 PM, Otto wrote:
> On Tue, Aug 30, 2011 at 6:41 PM, Brian Fegter<brian at fegter.com> wrote:
>> Just curious if anyone has experience with storing associative arrays with
>> hundreds of elements as a transient. The site in question uses persistent
>> caching and memcached.
> Just remember that transients aren't guaranteed, not when you're using
> memcached. Your data could be lost if the memcache is cleared or
> restarted or what have you. Memory based cacheing is lightning fast,
> but impermanent.
>
> A hit counter in postmeta might make more sense. Not as fast, but
> instead of a cron job, the list of top 20 could be as simple as a
> posts query. Of course, if this is a large traffic site (in hits, not
> in bandwidth), that could also bring it down. Need more information.
>
> -Otto
>
Even if the client doesn't want to store it in a separate table, it's
going to be worthwhile, since you can use the table for other kinds of
logging and the persistence issue Otto mentions.
I started a plugin for event logging to track JavaScript events and
things otherwise not seen in the Apache logs, it would be great to have
things work for even situations such as this too, which could be helped
out by having a post_id column in addition to a unique event name....
Here it is and 66 lines: http://downloads.braydon.com/outboundstats.zip
-Braydon
--
Colors of Digital Freedom
http://braydon.com/hacker-t-shirt/
More information about the wp-hackers
mailing list