src/Spiritix/LadaCache/LadaCacheServiceProvider.php
private function registerSingletons()
    {
        $this->app->singleton('lada.redis', function($app) {
            return new Redis();
        });

        $this->app->singleton('lada.cache', function($app) {
            return new Cache($app->make('lada.redis'), new Encoder());
        });

        $this->app->singleton('lada.invalidator', function($app) {
            return new Invalidator($app->make('lada.redis'));
        });

        $this->app->singleton('lada.handler', function($app) {
            return new QueryHandler($app->make('lada.cache'), $app->make('lada.invalidator'));
        });
    }
private function registerSingletons()
    {
        $this->app->singleton('lada.redis', function($app) {
            return new Redis();
        });

        $this->app->singleton('lada.cache', function($app) {
            return new Cache($app->make('lada.redis'), new Encoder());
        });

        $this->app->singleton('lada.invalidator', function($app) {
            return new Invalidator($app->make('lada.redis'));
        });

        $this->app->singleton('lada.handler', function($app) {
            return new QueryHandler($app->make('lada.cache'), $app->make('lada.invalidator'));
        });
    }
private function registerSingletons ( ) { $ this -> app -> singleton ( 'lada.redis' , function ( $ app ) { return new Redis ( ) ; } ) ; $ this -> app -> singleton ( 'lada.cache' , function ( $ app ) { return new Cache ( $ app -> make ( 'lada.redis' ) , new Encoder ( ) ) ; } ) ; $ this -> app -> singleton ( 'lada.invalidator' , function ( $ app ) { return new Invalidator ( $ app -> make ( 'lada.redis' ) ) ; } ) ; $ this -> app -> singleton ( 'lada.handler' , function ( $ app ) { return new QueryHandler ( $ app -> make ( 'lada.cache' ) , $ app -> make ( 'lada.invalidator' ) ) ; } ) ; }
Registers the cache services in the IoC container.
Registers the cache services in the IoC container .