Is there any way to turn caching on, but bust the cache when that endpoint/element changes through the cms? At the moment the caching is working great, but I have to manually bust the cache any time anything on the cms side changes. Is this the expected behavior and if not -- am I missing something here?
'api/v2/faqs.json' => [
'cache' => 'PT1M',
'elementType' => 'Entry',
'criteria' => [
'section' => 'faq'
],
'transformer' => function(EntryModel $entry) {
$categories = [];
foreach($entry->faqCategory as $category){
$categories[] = $category->id;
}
return [
'title' => $entry->title,
'answer' => (string)$entry->answer,
'categories' => $categories,
];
},
],
Thanks so much for the absolutely AWESOME plugin.
Is there any way to turn caching on, but bust the cache when that endpoint/element changes through the cms? At the moment the caching is working great, but I have to manually bust the cache any time anything on the cms side changes. Is this the expected behavior and if not -- am I missing something here?
Thanks so much for the absolutely AWESOME plugin.