Keep value for limited time and then flush it?

I have items that changes often. I do want to keep them persisted in the database … but I dont want to flood the database…
So … is there some way that I can keep the value for a limited time… ie keep history for two days or so … ?

There is nothing native to OH that lets you do this. You either need to use a DB that automatically flushes older data such as InfluxDB with a retention policy, use a db that compresses the data to keep it from growing like rrd4j, or manually clean the data out yourself.

OK! thanks