Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
kovpack
4 years agoOccasional Contributor
[71,72] Track item moving between vaults and requests rate limits
Hello,
I have questions regarding ways to keep track of an item when it's being moved between vaults, as well as request rate limits.
A bit of domain knowledge: we have a system, that lists dif...
Former Member
4 years agoHey kovpack
I don't think we do a great job of explaining how the cache works, and I think we want to do a better job documenting it moving forward, but for now, I think I can take a shot at some of your questions.
Before I start my explanation, I would just like to note that the Windows op
client does not support any caching and instead silently fetches all objects directly from the server even when the --cache
flag is specified.
The cache works by creating an in-memory store that stores encrypted vault items. We spawn a subprocess that manages it. The inactivity timeout of this process and its in-memory cache can be set by the op daemon
command along with the --timeout
option, but defaults to 24 hours if unspecified.
We use a lazy-sync method to determine whether or not the cached item is no longer up-to-date. That is, every time an item is retrieved with the --cache
flag enabled, we check whether its cached version is the same as what we have stored in our servers. If the server version has been updated, we fetch the new item and store it in the cache. So regardless of whether or not you specify the --cache
flag, we will retrieve the most up-to-date version of it.
When the item in the cache happens to be up-to-date, we deliver it faster than having to fetch the whole item from the server.
I hope this makes sense, and please do not hesitate if you have any followup questions!