MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / _clearInternalCache

Method _clearInternalCache

graphs/data/fitDamageStats/graph.py:41–52  ·  view source on GitHub ↗
(self, reason, extraData)

Source from the content-addressed store, hash-verified

39 self._projectedCache = ProjectedDataCache()
40
41 def _clearInternalCache(self, reason, extraData):
42 # Here, we care only about fit changes and graph changes.
43 # - Input changes are irrelevant as time cache cares only about
44 # time input, and it regenerates once time goes beyond cached value
45 # - Option changes are irrelevant as cache contains "raw" damage
46 # values which do not rely on any graph options
47 if reason in (GraphCacheCleanupReason.fitChanged, GraphCacheCleanupReason.fitRemoved):
48 self._timeCache.clearForFit(extraData)
49 self._projectedCache.clearForFit(extraData)
50 elif reason == GraphCacheCleanupReason.graphSwitched:
51 self._timeCache.clearAll()
52 self._projectedCache.clearAll()
53
54 # UI stuff
55 internalName = 'dmgStatsGraph'

Callers

nothing calls this directly

Calls 2

clearForFitMethod · 0.80
clearAllMethod · 0.80

Tested by

no test coverage detected