1
0
Fork 0
mirror of synced 2024-05-20 12:42:39 +12:00

fix: add missing collection prefix to cache purging

This commit is contained in:
Torsten Dittmann 2022-01-03 13:30:03 +01:00
parent fe6fb90fcd
commit ce3a647557
3 changed files with 4 additions and 5 deletions

View file

@ -111,7 +111,7 @@ function createAttribute(string $collectionId, Document $attribute, Response $re
}
$dbForProject->deleteCachedDocument('collections', $collectionId);
$dbForProject->deleteCachedCollection($collectionId);
$dbForProject->deleteCachedCollection('collection_' . $collectionId);
// Pass clone of $attribute object to workers
// so we can later modify Document to fit response model
@ -1257,7 +1257,7 @@ App::delete('/v1/database/collections/:collectionId/attributes/:key')
}
$dbForProject->deleteCachedDocument('collections', $collectionId);
$dbForProject->deleteCachedCollection($collectionId);
$dbForProject->deleteCachedCollection('collection_' . $collectionId);
$database
->setParam('type', DATABASE_TYPE_DELETE_ATTRIBUTE)

View file

@ -47,7 +47,7 @@ $logs = $this->getParam('logs', null);
data-param-order-types-cast-to="array"
data-scope="sdk"
data-name="project-documents"
x-data="{project: new URLSearchParams(location.search).get('project')}">
x-data="{ project: new URLSearchParams(location.search).get('project') }">
<div data-ls-if="0 == {{project-documents.sum}}" class="box margin-bottom">
<h3 class="margin-bottom-small text-bold">No Documents Found</h3>
@ -101,7 +101,6 @@ $logs = $this->getParam('logs', null);
data-service="database.listDocuments"
data-event="submit"
data-param-collection-id="{{router.params.id}}"
data-param-search="{{router.params.search}}"
data-param-limit="<?php echo APP_PAGING_LIMIT; ?>"
data-param-order-types="DESC"
data-param-order-types-cast-to="array"
@ -118,7 +117,6 @@ $logs = $this->getParam('logs', null);
data-service="database.listDocuments"
data-event="submit"
data-param-collection-id="{{router.params.id}}"
data-param-search="{{router.params.search}}"
data-param-limit="<?php echo APP_PAGING_LIMIT; ?>"
data-param-order-types="DESC"
data-param-order-types-cast-to="array"

View file

@ -210,6 +210,7 @@ class DatabaseV1 extends Worker
}
$dbForProject->deleteCachedDocument('collections', $collectionId);
$dbForProject->deleteCachedCollection('collection_' . $collectionId);
}
/**