dqq46733 2016-01-18 09:38
浏览 85
已采纳

Laravel 5.1缓存标记路径

I am using tags cache to cache data. I need to know, where this cached data actually stored ?

$response = Cache::tags(Locationsinv::table())->remember($cacheKey, $this->ttlCache, function() {
            return Locationsinv::select([
                    'id', 'location', 'status'
                ])->orderBy('id')->get();
        });
  • 写回答

1条回答 默认 最新

  • duancan8382 2016-01-18 09:53
    关注

    Where the Cache is stored depends on your configuration if you check out the Laravel docs for Cache it states

    The cache configuration is located at config/cache.php. In this file you may specify which cache driver you would like used by default throughout your application. 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.

    so most likely it will be stored within your projects storage directory ( with the default directory being storage/framework/cache/). Unless you've changed the configuration.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?