4

currently i added this line to Mojolicious::Lite app to disable caching

app->renderer->cache->max_keys(0);

but sometimes webpage showing updated content and sometimes showing cached template

i do not know exactly what the problem is, there is no problem with morbo, this is happening only with hypnotoad. i want to try disabling the cache.

edit: i solved my problem. problem is not with the mojolicious caching, it is with the database caching. if you experience similar problem, try setting 'AutoCommit' to 1 in your DBI->connect() method.

rx57
  • 189
  • 1
  • 5
  • 1
    Could it be the browser cache? Try pressing ctrl+shift+supr and deleting it. – sergiotarxz May 23 '19 at 08:12
  • @sergiotarxz i tried that. – rx57 May 23 '19 at 08:21
  • @sergiotarxz when i restart hypnotoad it is showing updated content. i think problem is with caching – rx57 May 23 '19 at 08:36
  • Then I don't know what can be happening, I am a novice with Mojolicious. – sergiotarxz May 23 '19 at 08:46
  • I remember a question about caching in Mojo. Let me find it for you. – simbabque May 23 '19 at 09:15
  • 2
    Take a look at https://stackoverflow.com/q/41750243/1331451. I wrote a new cache plugin https://metacpan.org/pod/Mojolicious::Plugin::Renderer::WithoutCache to solve it, and then had a long discussion with Mojo author SRI about the uselessness of it. He couldn't fathom someone wanting this. – simbabque May 23 '19 at 09:17

0 Answers0