Updated: Comment #1

Note that I'm not certain which version of site_audit is being used on the Pantheon dashboard: this might have already been fixed :P

Problem/Motivation

Sometimes, I want to cache a view results or rendered output for longer than 6 hours, but shorter than 6 days (say, 1 day). In this case, I choose a "Custom" caching time and enter a number of seconds (86400 seconds = 1 day).

But, Pantheon's dashboard reports lists the view in the lists of "The following Views are not caching rendered output" and "The following Views are not caching query results".

Proposed resolution

Update the Views checks so they doesn't interpret $handler->display->display_options['cache']['results_lifespan'] = 'custom';, $handler->display->display_options['cache']['output_lifespan'] = 'custom'; to mean the view is not cached.

Remaining tasks

Review, test.

User interface changes

None.

API changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mparker17’s picture

Try this patch!

mparker17’s picture

Status: Active » Needs review

  • Commit 6c18868 on 7.x-1.x authored by mparker17, committed by FluxSauce:
    Issue #2223783 by mparker17: Respect custom times for Views output,...
FluxSauce’s picture

Assigned: Unassigned » FluxSauce
Status: Needs review » Closed (fixed)

Thanks for the bug report and the patch! Commit is attributed to you. I ended up simplifying the logic, the max I was using initially just wasn't correct, so now it's a really straight forward if/else.