invalidate caches after log changes
This seems like something Annex.Sim would need to happen. And generally a really good idea.
This commit is contained in:
parent
f5f7b4a936
commit
a194e88a62
4 changed files with 10 additions and 2 deletions
|
@ -36,12 +36,14 @@ setGlobalNumCopies new = do
|
|||
curr <- getGlobalNumCopies
|
||||
when (curr /= Just new) $
|
||||
setLog (Annex.Branch.RegardingUUID []) numcopiesLog new
|
||||
Annex.changeState $ \s -> s { Annex.globalnumcopies = Nothing }
|
||||
|
||||
setGlobalMinCopies :: MinCopies -> Annex ()
|
||||
setGlobalMinCopies new = do
|
||||
curr <- getGlobalMinCopies
|
||||
when (curr /= Just new) $
|
||||
setLog (Annex.Branch.RegardingUUID []) mincopiesLog new
|
||||
Annex.changeState $ \s -> s { Annex.globalmincopies = Nothing }
|
||||
|
||||
{- Value configured in the numcopies log. Cached for speed. -}
|
||||
getGlobalNumCopies :: Annex (Maybe NumCopies)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue