Is it possible to call cache_graceful manually from code even if view use time based cache system to can rebuild cache?

Comments

gielfeldt’s picture

I'm not entirely sure what you mean regarding the views part.

It is possible to use cache_graceful() manually, like described on the project frontpage. It was originally designed for developer use, but has later been equipped with the Drupal cache backend & Views cache handler.

ShadowMonster’s picture

Thanks for answer

I would like manually clean and rebuild in background particular view cache - do not know yet the API but maybe something like:

$view = views_get_view;
cache_graceful($key, array('view', $view), 'cache', 20, 10); ?

It's regarding my other issue: #1545794: Rebuild view cache manually

gielfeldt’s picture

I don't think Cache Graceful is the way to go for you, if you want to create a system that rebuilds cache through notification, instead of invalidating upon request. But you have given me an idea to extend Cache Graceful.

1.) cache_graceful_invalidate($cid); // Invalidate $cid without deleting it, making it rebuild on next request.
2.) cache_graceful_rebuild($cid); // Rebuild

I looked at the other thread and saw there were a couple of other suggestions. Let me know what you find out.

gielfeldt’s picture

Hi

Did you find a solution to your problem?

gielfeldt’s picture

Status: Active » Postponed (maintainer needs more info)
gielfeldt’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)