php - Where does Laravel store configuration for memcached session driver? -
the laravel docs specify can enable memcached session handler in app/config/session.php
; however, not specify memcached configured (such servers use).
i see can configure memcached in app/config/cache.php
, don't know if that's used cache driver or session handler well.
yes, config in app/config/cache.php
cache drivers is used session driver well.
take @ vendor/laravel/framework/src/illuminate/session/sessionmanager.php
. method creates instance of memcached session driver one
/** * create instance of memcached session driver. * * @return \illuminate\session\store */ protected function creatememcacheddriver() { return $this->createcachebased('memcached'); }
that method calling other method in same file
/** * create instance of cache driven driver. * * @param string $driver * @return \illuminate\session\store */ protected function createcachebased($driver) { return $this->buildsession($this->createcachehandler($driver)); //$driver = 'memcached' }
which calling other method in same file
/** * create cache based session handler instance. * * @param string $driver * @return \illuminate\session\cachebasedsessionhandler */ protected function createcachehandler($driver) { $minutes = $this->app['config']['session.lifetime']; return new cachebasedsessionhandler($this->app['cache']->driver($driver), $minutes); }
there can see: this->app['cache']->driver($driver)
getting cache driver ioc container
Comments
Post a Comment