FeynCalc / feyncalc

Mathematica package for algebraic calculations in elementary particle physics.
https://feyncalc.github.io
GNU General Public License v3.0
309 stars 87 forks source link

Fix the stale cache problem #152

Closed j824h closed 8 months ago

j824h commented 2 years ago

This is to fix the issue #151 .

A concern is that this will cause FCUseCache[] to actually cache the dependency indefinitely until FCClearCache[] is called manually. This might cause a new memory overhead when dependency is updated frequently, especially so since cachedToString[] does not employ MemSet[].

Test did run slightly slower. test-69324b9.txt test-ee27a8f.txt

Besides, I am curious if caching ToString[] is beneficial, since I would expect it is supposed to be merely a conversion.