Skip to content
Permalink
Browse files
fix(projectsADM): clear cache after changing project (DEV-239) (#1943)
* refactor!(lists+groups): improve value objects + remove new lists implementation (DEV-160) (#1932)

* refactor group create payload

* separate group route value object

* add group iri value object

* use project IRI in group create patload + add group value object error messages &  test

* updated groups value objects and tests

* add value objects to groups update payload

* move optional params to value objects + replace either by zio.Validation

* refactor(list): replace Either with zio.Validation + move option to value objects

* refactor projectIri value object

* fix node creation

* add validation to payloads creation in lists and groups

* remove doubled checks and related tests

* disable new list route + separate NodeApiRequestADM to root & child

* list route factory + new list route implementation

* refactor list naming

* make parentNodeIri required for ListChildNodeCreatePayloadADM

* fix tests

* refactor lists get methods

* update lists docs

* fix update single lists properties + groups cleanup

* fix client-test-data

* bring back GET methods

* fix file extension

* fix testdata

* fix(userADM): diable catche for get methods

* fix: replace invalidateCachedProjectADM with CacheServiceFlushDB
  • Loading branch information
mpro7 committed Nov 19, 2021
1 parent 24e34dd commit 17c5c093381a351beccac3a18df5136f02a970c7
@@ -25,6 +25,7 @@ import org.knora.webapi.messages.admin.responder.usersmessages.{
}
import org.knora.webapi.messages.admin.responder.permissionsmessages._
import org.knora.webapi.messages.store.cacheservicemessages.{
CacheServiceFlushDB,
CacheServiceGetProjectADM,
CacheServicePutProjectADM,
CacheServiceRemoveValues
@@ -879,7 +880,8 @@ class ProjectsResponderADM(responderData: ResponderData) extends Responder(respo
throw NotFoundException(s"Project '$projectIri' not found. Aborting update request.")
}
// we are changing the project, so lets get rid of the cached copy
_ = invalidateCachedProjectADM(maybeCurrentProject)
// invalidateCachedProjectADM isn't clearing cache as expected
_ = storeManager ? CacheServiceFlushDB(KnoraSystemInstances.Users.SystemUser)

/* Update project */
updateProjectSparqlString <- Future(
@@ -30,6 +30,7 @@ import org.knora.webapi.messages.admin.responder.valueObjects.{
Shortname,
Status
}
import org.knora.webapi.messages.store.cacheservicemessages.CacheServiceFlushDB
import org.knora.webapi.routing.{Authenticator, KnoraRoute, KnoraRouteData, RouteUtilADM}
import zio.prelude.Validation

0 comments on commit 17c5c09

Please sign in to comment.