Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(projectsADM): clear cache after changing project (DEV-239) #1943

Merged
merged 4 commits into from Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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