Prevents infinite loop with traceSql(), remember() is back

This commit is contained in:
Samuel Georges 2015-02-07 10:08:10 +11:00
parent 795dcd0668
commit f4e60f105a
4 changed files with 8 additions and 17 deletions

View File

@ -44,13 +44,12 @@ Optional things you can delete, if they do not contain anything custom.
### Things to do
- Does config still inherit?
- Does translation still inherit? Switch to our own?
- Model->remember() replacement usage is buggy/broken
- Custom Exception Handler needs attention
- `laravel.log` should be renamed to system.log
- Move storage/cache generated by CMS to storate/cms/cache
- Fix clear cache command so it actually works
- Fix unit tests
- Consider creating a basic Controller since $router conflicts in CmsController
- Search for `@todo L5`
- Consider creating a basic Controller since $router conflicts in CmsController, or maybe avoiding conflict rename to $cmsRouter
- Search for `@todo L5`
- Dispatcher now native?
- Cron queue type now native?

View File

@ -24,8 +24,8 @@
},
"require": {
"php": ">=5.4",
"laravel/framework": "5.0.*@dev",
"illuminate/html": "5.0.*@dev",
"laravel/framework": "5.0.*",
"illuminate/html": "5.0.*",
"october/system": "~1.0",
"october/backend": "~1.0",
"october/cms": "~1.0",

View File

@ -111,7 +111,7 @@ class ServiceProvider extends ModuleServiceProvider
* Write all log events to the database
*/
Event::listen('illuminate.log', function ($level, $message, $context) {
if (!DbDongle::hasDatabase()) {
if (!DbDongle::hasDatabase() || defined('OCTOBER_NO_EVENT_LOGGING')) {
return;
}

View File

@ -110,17 +110,9 @@ class SettingsModel extends ModelBehavior
*/
public function getSettingsRecord()
{
//
// @todo L5 disabled until bug is fixed
//
// $record = Cache::remember($this->getCacheKey(), 1440, function() {
// return $this->model
// ->where('item', $this->recordCode)
// ->first();
// });
$record = $this->model
->where('item', $this->recordCode)
->remember(1440, $this->getCacheKey())
->first();
return $record ?: null;