Title: Redis Minify Cache Method Error
Last modified: December 30, 2016

---

# Redis Minify Cache Method Error

 *  [Agli Pançi](https://wordpress.org/support/users/aglipanci/)
 * (@aglipanci)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/redis-minify-cache-method-error/)
 * There is an issue with the Redis Cache Method for Minify.
 * Fatal error: $w3_cache is not defied on line 664
    File: /w3-total-cache/Minify_MinifiedFileRequestHandler.
   php
 * I went into the file and the logic seems to be copy-pasted from Memcached and
   that’s because it does not work for redis.
 * Lines from 658 to 662 contain this:
 *     ```
       if ( class_exists( 'Memcached' ) ) {
       	$w3_cache = new Cache_Memcached( $config );
        } else if ( class_exists( 'Memcache' ) ) {
       	$w3_cache = new Cache_Memcache( $config );
        }
       ```
   
 * While it should be like this to work:
 *     ```
       if ( class_exists( 'Redis' ) ) {
       	$w3_cache = new Cache_Redis( $config );
       } 
       ```
   
 * Can you guys update this on the next version?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [nigro.simone](https://wordpress.org/support/users/nigrosimone/)
 * (@nigrosimone)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/redis-minify-cache-method-error/#post-8629482)
 * try this patch from community version of W3 Total Cache [https://github.com/szepeviktor/w3-total-cache-fixed/blob/v0.9.5.x/Minify_MinifiedFileRequestHandler.php](https://github.com/szepeviktor/w3-total-cache-fixed/blob/v0.9.5.x/Minify_MinifiedFileRequestHandler.php)
 *  Thread Starter [Agli Pançi](https://wordpress.org/support/users/aglipanci/)
 * (@aglipanci)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/redis-minify-cache-method-error/#post-8633487)
 * [@nigrosimone](https://wordpress.org/support/users/nigrosimone/) already did 
   that, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Redis Minify Cache Method Error’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [redis](https://wordpress.org/support/topic-tag/redis/)

 * 2 replies
 * 2 participants
 * Last reply from: [Agli Pançi](https://wordpress.org/support/users/aglipanci/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/redis-minify-cache-method-error/#post-8633487)
 * Status: not resolved