We needed this feature in our project for several reasons.

Based on this guide : https://www.drupal.org/node/150220 adapted for D7

patched attached

Comments

lunatic created an issue. See original summary.

lunatic’s picture

Forgot to add hook_flush_caches (our use case is never clear them)

Attaching updated patch

lunatic’s picture

Status: Active » Reviewed & tested by the community

We have this on production for about a week and seems to work fine

Moving it to RTBC

heine’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.71 KB

Changes compared to the earlier patch:

- hook_flush_caches moved to the module file, or it will never be invoked.
- hook_update_N cannot use current schema information, changed to hardcoded schema.

We need this because we use memcache and views_navigation cache entries are quickly evicted. Users then see a "Sorry, could not find the requested page." message. We also don't want these cache items in memcache.

Using a separate cachebin allows us to store the cache items in the database.

BarisW’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/views_navigation.module
@@ -146,3 +146,10 @@ function views_navigation_block_view() {
+  return array('cache_views_navigation');

We could use the static VIEWS_NAVIGATION_CACHE_BIN here.

I'll fix this when committing the patch.

  • BarisW committed a8a1e51 on 7.x-1.x authored by Heine
    Issue #2580259 by lunatic, Heine, BarisW: Create and use own cache bin
    
BarisW’s picture

Status: Reviewed & tested by the community » Fixed

Pushed to DEV. Thanks both!

  • BarisW committed ad8149c on 7.x-1.x
    Move constants to the module file. Refs #2580259.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.