@Kyrne On my other forum, where I have just installed and enabled recache, I get the below in the console when trying to activate redis from the dropdown list
Fixed. Slightly convoluted process, and I can't think for the life of me why it needed to be resolved this way.
- Deleted all recache entries from the settings table
- Recreated them using the below SQL
INSERT INTO `settings` (`key`, `value`) VALUES
('recache.driver', 'Redis'),
('recache.enabled', '1'),
('recache.enableImageOptimization', '1'),
('recache.enableLazyLoad', '1'),
('recache.notWritable', '0'),
('recache.queryCacheEnabled', '1'),
('recache.Redis.settings', '{\"driver\":\"redis\",\"client\":\"predis\",\"default\":{\"persistent\":true,\"read_timeout\":60,\"host\":\"127.0.0.1\",\"port\":\"6379\"}}');
Modified AbstractModel.php lines 1-35 with the below
<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flarum\Database;
use Flarum\Event\ConfigureModelDates;
use Flarum\Event\ConfigureModelDefaultAttributes;
use Flarum\Event\GetModelRelationship;
use Illuminate\Database\Eloquent\Model as Eloquent;
use Illuminate\Database\Eloquent\Relations\Relation;
use LogicException;
use Reflar\ReCache\Database\ReCacheTrait;
/* Base model class, building on Eloquent.
*
* Adds the ability for custom relations to be added to a model during runtime.
* These relations behave in the same way that you would expect; they can be
* queried, eager loaded, and accessed as an attribute.
*/
abstract class AbstractModel extends Eloquent
{
use ReCacheTrait;
/* Indicates if the model should be timestamped. Turn off by default.
*
* @var bool
*/
public $timestamps = false;
Obviously not ideal, but it works 🙂