TreeviewCopyright © aleen42 all right reserved, powered by aleen42

Cache Back


  • The cache configuration file is located at ./config/cache.php.
  • Laravel supports popular caching backends like Memcached and Redis out of the box.
  • By default, Laravel is configured to use the file cache driver, which stores the serialized, cached objects in the filesystem.
  • For larger applications, it is recommended that you use an in-memory cache such as Memcached or APC.

Cache Prerequisites(先決條件)

  • When using the database cache driver, you'll need to setup a table to contain the cache items.
Schema::create('cache', function($table){
  • Using the Memcached cache requires the Memcached PECL package to be installed.
  • The default configuration uses TCP/IP based on Memcached::addServer.
'memcached' => [
        'host' => '',
        'port' => 11211,
        'weight' => 100
  • You may also set the host option to a UNIX socket path. If you do this, the port option should be set to 0.
`memcached` => [
        'host' => '/var/run/memcached/memcached.sock',
        'port' => 0,
        'weight' => 100
  • Before using a Redis cache with Laravel, you will need to install the predis/predis package (~1.0) via Composer.
Empty Comments
Sign in GitHub

As the plugin is integrated with a code management system like GitLab or GitHub, you may have to auth with your account before leaving comments around this article.

Notice: This plugin has used Cookie to store your token with an expiration.