Forum

Thread tagged as: Problem, Runway, Blog

setting 'cache' to false on perch_blog_categories() doesn't make any difference

I was looking to disable the cache while working on a page template that uses the blog addon but I'm unable to get the content to refresh before the 10 minute refresh rate.

I thought by adding the 'cache' option and setting to 'false' would do this but when I refresh the page (after clearing browser cache) no changes were visible.

What am I doing wrong?

Template snippet that relates to the blog part & summary report below:

<div class="container">
  <div class="row">
    <div class="col-sm-9 border">
    <?php perch_blog_categories(array(
    'template' => 'category.html',
    'cache' => 'false',
   )); ?>


   <div class="row">
   <div class="col-sm-6">
   News
   <?php
perch_blog_custom(array(
    'section' => 'news',
    'template' => 'post_in_list.html',
));

?>
    </div>

    <div class="col-sm-6">
    Events
    <?php 
    perch_blog_custom(array(
    'section' => 'events',
    'template' => 'post_in_list.html',
    ));
     ?>
    </div>
    </div>

        </div>

        <div class="col-sm-3 border">
        Sections
     <?php
        perch_blog_sections(array(
        'cache' => 'false',
    ));
?>
    </div>
SUMMARY INFORMATION

Perch Runway: 2.8.32, PHP: 5.5.38, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $, with PDO
Server OS: Darwin, cgi-fcgi
Installed apps: content (2.8.32), assets (2.8.32), categories (2.8.32), perch_blog (5.0), collection_2 (2.8.32), collection_1 (2.8.32), perch_forms (1.8.3), perch_backup (1.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_blog' );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/XXXX/Documents/MAMP-SERVERS/XXX.local/perch
PERCH_CORE: /Users/XXXX/Documents/MAMP-SERVERS/XXX.local/perch/core
PERCH_RESFILEPATH: /Users/XXX/Documents/MAMP-SERVERS/XXX.local/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: XX.local
HTTP_HOST: XXX.local
Graham Shedden

Graham Shedden 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you in development mode?

Thanks Drew.

It was because I had:

'cache' => 'false',

There's no need for the single quotes round false so should have been:

'cache' => false,
Drew McLellan

Drew McLellan 2638 points
Perch Support

That's right - 'false' as a string in true in PHP