Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Multisite need the clear the cache everytime

Started by Muut Archive 10 years ago · 3 replies · 476 views
10 years ago

If i clear the cache with bin/grav clear-cache then the page shows up again – at least until I refresh.

for that issue i need some advices

10 years ago

i have only one page: home, maybe i didnot explain very well (english not my native language) so excuse me. My home page in my subsite works very well, i have that line in my modular.md {% do assets.addJs('/user/sites/spa/pages/home/_slideshow/typed.min.js') %} if i load the page for the first time everything ok, script is loaded, if i refresh, i have console error because the script was not loaded then if i clear the cache, again all good until i refresh etc, i try to add in my setup.php


'cache' => [
'type' => 'ReadOnlyStream',
'prefixes' => [
'' => ["user/{$folder}/cache"],
]
],

TXT


but still that issue, only with assets added in the modular.md
10 years ago

another try was in base.html.twig and in that place it always works so it seems an issue only when you add assets in modular

TWIG

    {% block javascripts %}
        {% do assets.addJs('jquery', 101) %}
        {% do assets.addJs('/user/sites/spa/pages/home/_slideshow/typed.min.js', 101) %}
        {% if page.header.http_response_code == 404 %}
          {% do assets.addJs('theme://js/custom/jquery.spritely.js') %}
        {% endif %}
    {% endblock %}
---

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1360 9 years ago
Archive · by Muut Archive, 9 years ago
2 938 9 years ago
Archive · by Muut Archive, 9 years ago
2 4068 9 years ago
Archive · by Muut Archive, 9 years ago
1 2958 9 years ago
Archive · by Muut Archive, 9 years ago
3 1122 9 years ago