Best answer

store.clear older than a certain date?

  • 18 November 2020
  • 3 replies
  • 97 views

Userlevel 2
Badge

A store is limited to 500 keys so can get full.

https://zapier.com/help/doc/storeclient-javascript says it will automatically expire keys older than 3 months.

So, is there instead a way to clear keys older than a certain date? e.g. 4 days is old enough for my use case.

 

Thanks,

   Martin

icon

Best answer by mrjcleaver 1 December 2020, 14:02

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 2
Badge

Also, there seems to be no way to determine how many keys are in the store.

https://store.zapier.com/ wasn’t much help either.

Thanks,

   Martin

Userlevel 7
Badge +9

I’m not sure...Can you explain your use case here a little bit for us?

 

This is the only info I could find: https://stackoverflow.com/questions/53542315/remove-keys-from-zapier-storage-older-than-1-month-old

 

David’s answer was as follows: 

 

David here, from the Zapier Platform team.

First things first - both the Storage by Zapier app and the Python / JS store clients all use the same backend. Ergo, keys that haven't been touched in 3 months are purged, regardless of which client originally added them. If that knowledge fixes your problem, great!

If the [4 day] window is important, there are a few options.

  1. whenever you write the key, add another step on a [4 day] delay that removes it
  2. store the info with the date it was written. Then periodically (weekly?) get all the values, iterate over them to find the values that are outside your window, and delete those.

Those are the best ways I can think to do it. Hope that points you in the right direction!

 

 

 

 

 

Userlevel 2
Badge

Somewhere I read to give up on Store and instead use a Google Sheet. That has the bonus that it’s much easier to diagnose.