Replies: 1 comment
-
I don't think this is a good idea. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Maybe something like this
wbi.item.load(['Q42', 582])
and then use
wbi.item.get('Q582', use_cache=True)
or maybe something like this
wbi = WikibaseIntegrator(use_cache=True)
wbi.item.load(['Q42', 582])
wbi.item.get('Q582') # Use the cache
and later
item = wbi.item.get('Q2') # Try to use the cache, no cache, fallback to API and update the cache
item.write() # Write the entity to the Wikibase, update the cache
[...]
wbi.ite.get('Q2') # Try to use the cache, found the (updated) entity in the cache, use it
The cache can lead to concurrency issue if someone else edit the entity.
Beta Was this translation helpful? Give feedback.
All reactions