Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 17c5c09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
Expand Up @@ -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

Expand Down

0 comments on commit 17c5c09

Please sign in to comment.