php – Laravel Cache不会在生产服务器上存储缓存文件
发布时间:2020-12-14 19:38:49 所属栏目:大数据 来源:网络整理
导读:我有一个Laravel Cache系统的问题(我使用Laravel 4.1). 在我的本地服务器上,Laravel所在的“app / storage”文件夹 存储缓存的文件具有755权限. 在我的生产服务器上,同一文件夹具有相同的权限 码. 在我的本地服务器上,当我使用Laravel的缓存来缓存数据时 上
我有一个Laravel Cache系统的问题(我使用Laravel 4.1).
>在我的本地服务器上,Laravel所在的“app / storage”文件夹 编辑 /* |-------------------------------------------------------------------------- | Default Cache Driver |-------------------------------------------------------------------------- | | This option controls the default cache "driver" that will be used when | using the Caching library. Of course,you may use other drivers any | time you wish. This is the default when another is not specified. | | Supported: "file","database","apc","memcached","redis","array" | */ 'driver' => 'file',/* |-------------------------------------------------------------------------- | File Cache Location |-------------------------------------------------------------------------- | | When using the "file" cache driver,we need a location where the cache | files may be stored. A sensible default has been specified,but you | are free to change it to any other place on disk that you desire. | */ 'path' => storage_path(). DIRECTORY_SEPARATOR . 'cache',/* |-------------------------------------------------------------------------- | Database Cache Connection |-------------------------------------------------------------------------- | | When using the "database" cache driver you may specify the connection | that should be used to store the cached items. When this option is | null the default database connection will be utilized for cache. | */ 'connection' => null,/* |-------------------------------------------------------------------------- | Database Cache Table |-------------------------------------------------------------------------- | | When using the "database" cache driver we need to know the table that | should be used to store the cached items. A default table name has | been provided but you're free to change it however you deem fit. | */ 'table' => 'cache',/* |-------------------------------------------------------------------------- | Memcached Servers |-------------------------------------------------------------------------- | | Now you may specify an array of your Memcached servers that should be | used when utilizing the Memcached cache driver. All of the servers | should contain a value for "host","port",and "weight" options. | */ 'memcached' => array( array('host' => '127.0.0.1','port' => 11211,'weight' => 100),),/* |-------------------------------------------------------------------------- | Cache Key Prefix |-------------------------------------------------------------------------- | | When utilizing a RAM based store such as APC or Memcached,there might | be other applications utilizing the same cache. So,we'll specify a | value to get prefixed to all our keys so we can avoid collisions. | */ 'prefix' => 'laravel', 你对我做错了什么了解吗? 解决方法
将文件夹的权限设置为755到777以查看它是否有效.如果缓存现在可以正常工作,那么您就有了权限问题.将其重新设置为755,并确保您的Web服务器使用的用户是您的文件夹的所有者.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |