Why can’t I save encrypted data in a transient?

So the answer was to use base64_encode and base64_decode. So basically doing something like this to set the transient: $json_contact_info = json_encode( $contact_info ); $transient_data = encrypt_text( $json_contact_info ); $transient_array = base64_encode( $transient_data ); $transient_set = set_transient( $transient_name, $transient_array, 60 * 60 * 24 * 7 ); And then to get the transient: $decrypted_transient_data = … Read more

how to use transient method?

First, you don’t need a raw SQL query, and by using one you give up all of WP’s optimisations. For example, if you run the query twice, it runs twice. If you had used WP_Query to getch those posts though, it would save them the first time to avoid making additional queries. It’s even possible … Read more

Ajax call to transients

Without object caching plugins transients are stored using options API and, if set to expire, they have auto-load disabled. Meaning: First request to transient needs to fetch it from database. Subsequent requests will get data from memory. However note that “memory” here is memory space of single specific page load. It’s not shared and not … Read more

Transient Loop Not working as expected

What is the code on line 3645? You didn’t specify. From what I see in your code, $transient_name should be something like “_my_post_list_transient” – a string. If $transient_name is returning a post object, then your call to this function may be the problem.