File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -222,9 +222,18 @@ def _save():
222222 -------
223223 None
224224 """
225+ global CACHE_CLEARED
226+
227+ if not CACHE_CLEARED : # pragma: no cover
228+ msg = "Numba njit cached files are not cleared before saving/overwriting. "
229+ msg = "You may need to call `cache.clear()` before calling `cache.save()`."
230+ warnings .warn (msg )
231+
225232 _enable ()
226233 _recompile ()
227234
235+ CACHE_CLEARED = False
236+
228237 return
229238
230239
@@ -258,11 +267,6 @@ def save():
258267 msg += "The `stumpy` cache files may not be saved/cleared correctly!"
259268 warnings .warn (msg )
260269
261- if not CACHE_CLEARED : # pragma: no cover
262- msg = "The cached files are not cleared before saving/overwriting. "
263- msg = "You may need to call `cache.clear()` before calling `cache.save()`."
264- warnings .warn ("msg" )
265-
266270 _save ()
267271
268272 return
You can’t perform that action at this time.
0 commit comments