Proper place to store background job related data? | Community
Skip to main content
Level 2
March 1, 2019
Solved

Proper place to store background job related data?

  • March 1, 2019
  • 2 replies
  • 1660 views

In order to allow delta indexing for our Solr cores, we store the last index time. Currently, it's only stored in memory in a Java map, so the value is lost on server restart.

What is the proper place to store a value like this?

Configuration comes to mind, but I don't want it to be configurable. It's only needed by the background job that fires off the Solr indexing.

Should it be stored in the CRX in the "apps" node somewhere? That doesn't seem quite right to me, and I'd have to be careful so deployments wouldn't overwrite it there, too.

What's the best way to do this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by wimsymonsvrt

You can store it below /var.

We store all such data in a subfolder below /var/companyname.

For your case, I’d suggest /var/yourcompany/solr where you have a property lastindextime of type Date.

2 replies

wimsymonsvrtAccepted solution
Level 4
March 2, 2019

You can store it below /var.

We store all such data in a subfolder below /var/companyname.

For your case, I’d suggest /var/yourcompany/solr where you have a property lastindextime of type Date.

EricESAuthor
Level 2
March 4, 2019

Perfect! Exactly what I was looking for.