[wp-hackers] Transient key best practice

Micky Hulse mickyhulse.lists at gmail.com
Mon Sep 9 19:50:40 UTC 2013


Thanks for the blazing fast reply Filippo! I really appreciate it! :)

On Mon, Sep 9, 2013 at 12:42 PM, Filippo Pisano
<filippo.pisano at gmail.com> wrote:
> You can simply md5 your key and query db for the md5 string corresponding
> to your API request.

So, are you saying that I should do something like:

$transient_key =
wp_hash("namespace_youtube:playlist_or_user|||cache_time|||number_of_items"
, 'md5');

In that case, could I drop "namespace_youtube:" and just md5 the rest
for the key?

Sorry if I'm asking silly questions ... I just want to make sure I'm
following standard procedure here. :)

Thanks so much!

Cheers,
M


More information about the wp-hackers mailing list