• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extending redis library

I tried extending the redis library without any success.

Error: Severity: error --> Exception: Class 'CI_Cache_redis' not found /var/www/vhosts/***.net/***.net/application/libraries/MY_redis.php 5

Redis library is loaded and functional, just extending seems not possible.

PHP Code:

('BASEPATH') OR exit('No direct script access allowed');

MY_redis extends CI_Cache_redis {
    function __construct(){

    public function publish($channel$message) {

    public function __destruct() {
        if ($this->_redis) {


Out of the box, database classes can not be extended or replaced with your own classes as all other classes can. In other words, the MY_ convention does not apply to the database files.

I think you would have to extend the CI_Loader class and/or register an autoloader that can locate db driver files.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.