[wp-hackers] Transient Size/Performance
Brian Fegter
brian at fegter.com
Tue Aug 30 23:41:08 UTC 2011
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.
I'm looking to build a time-sensitive hit counter that keeps a rolling two
week count. The site has over 4,000 video pages. My initial thought is to
create a transient for each day that expires after two weeks. This daily
transient would contain an associative array such as video_ID => hits A
cron job would run twice per day to index the top 20 videos for a "What's
Popular Now" widget as well as other uses throughout the site.
The client doesn't want to create an extra table to track hits.
Any thoughts or suggestions on performance going this route? This is a large
site I'm planning on using Mark Jaquith's TLC Transient framework.
https://gist.github.com/1149945/d262805fc3498f7b705e5c2e6437775a3ad4b4a8
Thanks for the input.
Brian
More information about the wp-hackers
mailing list