We are on Alfresco 5.1.3. We have a "Batch" Alfresco instance that is not part of the cluster and that handles batch jobs.
We have several "Request" Alfresco instances that are part of the cluster and that handle transactional requests (mainly via CMIS).
Our Batch instance updates a node's metadata, but of course, the Request instances cannot see the new metadata until their cached value expires.
My question is:
Is there a way for the Request instances to fetch the node while forcing a refresh from the database instead of getting the stale cached data?
Thanks.
The internal / undocumented API of the NodeDAO provides a setCheckNodeConsistency method to disable use of the shared cache of the nodesTransactionalCache for the current transaction, which will result in always loading the state / identity data from the DB. This does not however affect the caches for aspects and properties, but these should not be a problem since their value key includes the node identity data (including the ID of the txn when the node was last changed), so if the node was updated, it will bypass the stale, cached data and also load the current data from the database.
Though I do question the setup of having a write-enabled server connected to the same DB without being part of the cluster. It is generally possible to do this for read-only servers (when disabling some shared caches), i.e. to offload work for indexing without cluster communication adding more load, but IMHO should not be used for write-enabled servers.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.