app/config/cache.php
. These options control the application cache.cache_driver
array
will disable the cache across requests. Additional driver-specific options may be required with certain values.apcu
, array
, file
, memcached
, redis
, php-file
file
CACHE_DRIVER
cache_lifetime
0
will cache indefinitely.60
(one hour)CACHE_LIFETIME
cache_lottery
1
and 100
2
CACHE_LOTTERY
memcached_host
localhost
MEMCACHED_HOST
memcached_port
0
to 65353
)11211
MEMCACHED_PORT
memcached_config
cache_driver
configuration option is set to memcached
. The closure receives a Memcached
object as it's only parameter. You can use this object to configure the Memcached connection. At a minimum you must connect to one or more Memcached servers via the addServer()
or addServers()
methods.Memcached
objectmemcached_host
on the port defined by memcached_port
.MEMCACHED_HOST
and MEMCACHED_PORT
variables by defaultredis_host
localhost
REDIS_HOST
redis_port
0
to 65353
)6379
REDIS_PORT
redis_config
cache_driver
configuration option is set to redis
. The closure receives a Redis
object as it's only parameter. You can use this object to configure the Redis connection. At a minimum you must connect to one or more Redis servers via the connect()
or pconnect()
methods.Redis
objectredis_host
on the port defined by redis_port
.REDIS_HOST
and REDIS_PORT
variables by defaulthttp_cache
view_cache
false
to disable view caching entirely.false
to disable the view cache entirelyapp/cache/views
VIEW_CACHE