Laravel正在缓存我的代码? [英] Laravel is caching my code?

查看:72
本文介绍了Laravel正在缓存我的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近从CodeIgniter更改为Laravel.我喜欢它的工作方式,但是我只有一个问题.当我犯了一个错误时(这是因为laravel对我来说是新手,这很常见),我想改变问题.当我刷新页面以再次对其进行测试时,再次出现相同的错误.即使删除了代码也会出现错误.

I recently changed from CodeIgniter to Laravel. I love the way it works, but I only have one problem. When I make a mistake (which because laravel is new to me, it is often) I want change the problem. When I refresh the page to test it out again the same error comes up again. Even when the code is deleted that gives the error.

当我进入调试模式时,我可以看到出现问题的代码行.当我更改代码时,我可以看到异常(因为它显示了错误所在的某些代码),甚至消失了,但没有错误.

When I put on debug mode I can see the code line where there is a problem. When I change the code I can see that in the exception (because it shows some of the code where the error is) and even there it is gone, but not the error.

是否可以在开发模式下禁用此功能?我找不到一些解决方案,但是我不知道如何用谷歌搜索它.

Is it possible to disable this on development mode? I can't find some solutions, but I don't know how to google for it.

你们知道吗?

这里有一些编码示例.如果我做一些愚蠢的事情,如:

Here you have some coding examples. If I do something stupid like:

Router::action('HomeController@getIndex');

它给了我错误:类路由器没有方法action().没错,这是我犯的一个错误,因为我弄乱了Router和Redirect之间的名称(因为这对我来说有点新).

It gives me the error: Class Router doesn't have the method action(). And that's true, it's a mistake that I made because I mess up the names between Router and Redirect (because it's all a bit new for me).

当我将其更改为:

Redirect::action('HomeController@getIndex');

这是有效的代码,仅来自laravel文档,但laravel或浏览器仍然给我提供了Router并没有action()错误,即使我更改了它甚至删除了它也是如此.

It's the code that works, just from the documentation of laravel, but laravel or the browser still gives me the Router doesn't have action() error, even when I changed it or even deleted it.

我希望这能使您对我的问题有更多的了解:)

I hope this gives you more explenation about my problem :)

推荐答案

我最终发现了我的缓存出了什么问题. 不是Laravel缓存了我的结果,而是MAMP上的PHP 5.5.3.

I finnaly found out what the problem was with my caching. It wasn't Laravel that cached my results, but it was PHP 5.5.3 on MAMP.

事实证明,MAMP上的PHP 5.5.3启用了具有默认设置的OPCache.

It turns out that PHP 5.5.3 on MAMP has OPCache on with the default settings.

伙计们,非常感谢您的帮助!我希望有一天能为您提供帮助.

Guys, I really appreciate your help! And I hope I can help you out someday.

这篇关于Laravel正在缓存我的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆