-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace homecooked cache #82
base: master
Are you sure you want to change the base?
Conversation
baee2ad
to
e73e5d9
Compare
author Andy Georges <andy.georges@ugent.be> 1674744933 +0100 committer Andy Georges <andy.georges@ugent.be> 1677589584 +0100 gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsRL1Gh5rbMUbS7S8e6TNo671utAFAmP9/FAACgkQe6TNo671 utCySA//ZFeuoh5ZG3son8CXs0jZvfQBnxlnP0M3e4HbGi/KBINO95TB8TLjIbQ/ ypvzEiHDeUIUsJn69ef645DGvNkop9H+1IepTh73WRNw/z13KBPjV/X7XoMUk4iZ 7scmeHHbA6FH6KP4hgI5XCslGQKn6obucaCZgDE8e1bZldD8NuJxgQXapJvK0gQ/ xJwarkZQ+4OTKxxRtCyWac33Ftx2z6mCbtdERae5KRuq+8oUOI1SG1q9kp+MGITa 6L5GEED/7fsurfLEo0GRD9dHxlHd7RMO6GziCaIjcDeipFDP2bFM7x5uM0B9Nw2g dxO3gz7WG8YZF9vKtYuN1Sas1yGTLYBB5TjcI6lXhyCtQy2NVAeeAjbjCqr9dbzV n03oA9PdTojGq5dhXPwrkR17fXyoxiND7JI9ibdxL/yaGCZPJN0NgCHyZl5CnhOC o7qR3nhVZoJ9HalVzZnbjJcYjECWBYKYuRZoicclf56gvp6QvC/bDESQBBpe8SbF qIqc7SLQ+gddE8ajFRwiBeWU3UX9t/XPWpEvixvI4dXaZIpFydQGLsYQ3/9OehPv z0IzWp648H5hXfmYk3zpe25QfjGDj23OzwqHlNkr7KdReXck/2HhhDHL2Fw/h4jB CpYOlt05wLZlPnLt35sKomirx6yIOFU5rfkUdTU/0Ris90ZQWtI= =pjru -----END PGP SIGNATURE----- test: fixes and refactoring to work with DiskCache
a250fea
to
389049b
Compare
else: | ||
self.new_shelf[key] = old | ||
return False | ||
stored = self.set(key=key, value=(now, data), expire=threshold) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do if threshold is None?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it will not set an expiration time on the key.
@@ -441,7 +448,7 @@ def __init__(self, **kwargs): | |||
self._final = None | |||
self._final_state = None | |||
|
|||
self._threshold = 0 | |||
self._threshold = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the implication of this?
@itkovian did you actually try this somewhere? Is the disk cache thing just a drop in replacement? will current tools just keep working? And changing the logger, does that still work? I did not remove it a while back because messages kept getting lost, because of mixing fancylogger and logging. (or I did not dare to remove it, also possible). |
This is pretty much a drop-in replacement, but with nicer features and code we need not maintain. It is used in the nagios module tests. |
I still disagree with this statement "code we need not maintain". If we have to vet the code and build rpms ourselves and have to follow up on version updates we are still paying a maintenance cost, so we are still maintaining this. 😄 maintenance is more than only "writing the code". I'm not saying I won't merge this (well, I won't merge anything until I'm back), but change your definition of code maintenance . 😉 |
Well, code this is available on the innerwobbles and works may be better than rewriting things ourselves. |
No description provided.