# Save the last fetch/execution time in a persistent file

**URL:** <https://discuss.elastic.co/t/save-the-last-fetch-execution-time-in-a-persistent-file/111959>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [December 15, 2017, 11:08am UTC](https://discuss.elastic.co/t/save-the-last-fetch-execution-time-in-a-persistent-file/111959 "2017-12-15T11:08:37Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mguggi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mguggi/32/79070_2.png) [@mguggi](https://discuss.elastic.co/u/mguggi)\
**Post date:** [December 22, 2017, 10:12am UTC](https://discuss.elastic.co/t/save-the-last-fetch-execution-time-in-a-persistent-file/111959/3 "2017-12-22T10:12:17Z")

</div>

I want develop an [oraclebeat](https://discuss.elastic.co/t/release-resources-when-metricbeat-stops/107542/8?u=mguggi) on basis on metricbeat. In some metricsets I get records from a table which I don't want receive twice if the beat is planned or unplanned restartet.

Yes, you are right I need something like a disk cache. At the moment I use the simple library [diskv](https://github.com/peterbourgon/diskv) for my use case. My first draft is already provided on [github.com](https://github.com/mguggi/oraclebeat).

@ruflin Thanks for providing the link.

---

_[View the full topic](https://discuss.elastic.co/t/save-the-last-fetch-execution-time-in-a-persistent-file/111959)._
