Skip to content

Conversation

@itkovian
Copy link
Member

No description provided.

@itkovian itkovian force-pushed the replace-homecooked-cache branch 4 times, most recently from baee2ad to e73e5d9 Compare February 28, 2023 11:23
author Andy Georges <[email protected]> 1674744933 +0100
committer Andy Georges <[email protected]> 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
@itkovian itkovian force-pushed the replace-homecooked-cache branch from a250fea to 389049b Compare February 28, 2023 13:08
else:
self.new_shelf[key] = old
return False
stored = self.set(key=key, value=(now, data), expire=threshold)
Copy link
Contributor

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?

Copy link
Member Author

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.

self._final_state = None

self._threshold = 0
self._threshold = None
Copy link
Contributor

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?

@wdpypere
Copy link
Contributor

@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).

@itkovian
Copy link
Member Author

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.

@wdpypere
Copy link
Contributor

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 . 😉

@itkovian
Copy link
Member Author

Well, code this is available on the innerwobbles and works may be better than rewriting things ourselves.

@itkovian
Copy link
Member Author

itkovian commented Apr 4, 2025

Anyway, the diskcache is already being used in production for the account page quota upload. So apparently there was no issue merging the PR there ¯_(ツ)_/¯

@itkovian
Copy link
Member Author

So, regarding the vetting, we can either write stuff ourselves and risk having shite code or we can use stuff that other people use and that is more used and tested and checked. We'll never verify our own stuff as much as things used by a large number of people. Second, I would like to keep RPMs, but have a self-contained unit for each tool so we do not need to build every titbit we use into a separate RPM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants