Permalink
Browse files

Use serialize instead of implode to generate unique cache key per req…

…uest per ad code. Fix for #949c729bc0dae4fe9e04e9727bedcd01f145551f
  • Loading branch information...
rinatkhaziev committed Jun 5, 2013
1 parent 3e7b858 commit 6f76bdf92c859c5e3d1eef0188931fae0bb72ef6
Showing with 1 addition and 1 deletion.
  1. +1 −1 ad-code-manager.php
View
@@ -893,7 +893,7 @@ public function get_matching_ad_code( $tag_id ) {
// This method might be expensive when there's a lot of ad codes
// So instead of executing over and over again, return cached matching ad code
- $cache_key = "acm:{$tag_id}:" . md5( implode( ',', $wp_query->query_vars ) );
+ $cache_key = "acm:{$tag_id}:" . md5( serialize( $wp_query->query_vars ) );
if ( false !== $ad_code = wp_cache_get( $cache_key, 'acm' ) )
return $ad_code;

0 comments on commit 6f76bdf

Please sign in to comment.