Skip to content

[Question] Reuse decorator settings + Race Conditions #742

Closed Answered by Dreamsorcerer
Wyko asked this question in Q&A
Discussion options

You must be logged in to vote

Regarding the first point, I found the caches.set_config option which helps define common settings. It wasn't entirely obvious via the docs, but another issue here clarified that I could use it for the decorator as well via an alias.

Right, to configure caches, you can do that. I'd like to remove the whole config thing in 1.0 though, instead requiring the cache object to be passed to the decorator (instead of a name).

Just any time that I have potentially multiple access to a shared data storage, I have to ask the question of whether it's dangerous or not.

Well, what's going to be dangerous? If you have a race condition where you are fetching a cache item and saving a cache item, then…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Wyko
Comment options

@Dreamsorcerer
Comment options

Answer selected by Wyko
@Wyko
Comment options

@Dreamsorcerer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #741 on July 10, 2023 15:37.