igaster / laravel-theme

Theme support for Laravel
MIT License
516 stars 110 forks source link

Issues when cache = on #109

Closed Nuranto closed 5 years ago

Nuranto commented 5 years ago

When cache is on, the theme inheritance stops to work. I don't know why.

I saw there is a specific way of dealing with cache, is there a reason you did not use laravel's cache system ?

igaster commented 5 years ago

Hello @Nuranto,

This is not the same with laravel cache. (ie Application Cache)

This is a permanent cache of theme structure to avoid scanning folders and paths. It is the same concept with compiled blade templates, or configuration caching etc...

About your problem:

Nuranto commented 5 years ago

Hello @igaster

* about this, wouldn't it better to store the cache file in storage/framework/ with other caches ? So we're quite sure the folder has the right permissions ?

UnrulyNatives commented 5 years ago

I also have a problem with caching. A serious one. My problem is present even when the cache option is set to false in config\themes.php.

I asked my friend who is a guru in PHP programming and he has concluded, that the problem is in the themes_path variable. It should not be set as null but as, for instance, 'themes_path' => resource_path('views'),. Otherwise the package loses track of the precedence as of where to check for template files first.

Still, at this moment I tried everything (including theme:refresh-cache and php artisan cache:clear' andphp artisan config:clear) and in my app's local instance the app takes file from the main folder and not the theme folder (the theme is set properly, which I check with the\Theme::getSetting('cssframework')`.

igaster commented 5 years ago

Hello @UnrulyNatives, you can try to disable theme cache completely... check the themes.php config file