martijnboland / apptext

AppText is a content management system for applications. Application developers can use it to replace static resources in applications with dynamic content and delegate content management to non-developers.
https://apptext.io
Apache License 2.0
23 stars 5 forks source link

Handle text change on multiple instance #85

Closed nrmohan closed 1 year ago

nrmohan commented 2 years ago

How can we clear the cache, when the app is hosted in a container orchestrator like Kubernetes where we will have multiple instance of same app running.

Any help would be greatly appreciated.

martijnboland commented 2 years ago

You mean the cache in the AppText.Localization package for ASP.NET? That one currently uses IMemoryCache and I'm afraid that this doesn't work with multiple instances. To support multiple instances, IDistibutedCache should be used instead. Then, AppText should use any implementation of IDistributedCache that is supplied via the host application and default to MemoryDistributedCache if none is specified. I'll gladly accept a Pull Request for that ;-)