沃梦达 / 编程问答 / php问题 / 正文

Laravel 5 清除视图缓存

Laravel 5 Clear Views Cache(Laravel 5 清除视图缓存)

本文介绍了Laravel 5 清除视图缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到 Laravel 缓存视图存储在 ~/storage/framework/views 中. 随着时间的推移,它们会占用我的空间.如何删除它们?有什么命令可以吗?我试过 php artisan cache:clear, 但它没有清除视图缓存.有了这个,我必须手动删除所述文件夹中的文件.

I notice that Laravel cache views are stored in ~/storage/framework/views. Over time, they get to eat up my space. How do I delete them? Is there any command that could? I tried php artisan cache:clear, but it is not clearing the views cache. With that, I have to manually delete the files in the said folder.

另外,如何禁用视图缓存?

Also, how do I disable the views caching?

推荐答案

从 Laravel 5.1 开始,现在有一个 php artisan view:clear 命令用于这个任务

There is now a php artisan view:clear command for this task since Laravel 5.1

这篇关于Laravel 5 清除视图缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Laravel 5 清除视图缓存

基础教程推荐