Deployment Cache Clear

Hello,

I want to make cache clear after repositoryService.createDeployment().

How can I do this at java?

Thank you…

@CanBASCI By default process engine caches all the process definitions post deployment to avoid polling the database every time and improves the performance of the system.

There’s no built-in java api provided by camunda to clear deployment cache.

Why do you want to clear the deployment cache? Rather than clearing cache you can delete-deployment via rest api or java api like below which will remove the process from cache too.

execution.getProcessEngineServices().getRepositoryService().deleteDeployment(deploymentId, true);

Otherwise, if you want to clear the cache of process only, then you can give a try by providing a Custom Cache Implementation.

2 Likes

Thank you @aravindhrs .

Sometimes I changed xml from act_ge_bytearray table and when I do that I have to stop then start spring project.
Is there any service to call it for cache clear after update act_ge_bytearray xml?

@CanBASCI when you do deployment via java API or rest api, by default camunda will refresh the cache?

Are you directly accessing the table and updating the contents ??

1 Like

Hello @aravindhrs
Everything is working well at Camunda. when I deploy from api its making cache very well.
I just want to learn is there any service or method for cache clear when I change custom xml column from table with update script.
I asked this for to be faster at my project tests and its just my personel question :slight_smile:

@CanBASCI if you update the data directly into the database, it won’t update the cache and there’s no api to clear cache for this scenario

1 Like

@aravindhrs thank you so much for information :slight_smile: