3 ms·
What sort of a cache would use IO? Not any cache I've heard of. (Genuinely interested)
by asQuirreL 11y ago
What sort of a cache would use IO? Not any cache I've heard of. (Genuinely interested)
- fyolnish 11y agoA cache too big to fit in memory
- Agathos 11y agoAny cache that is provided by an external process, or even by a remote machine, such as memcached.
- asQuirreL 11y agoI guess I should clarify and say "What sort of a cache would use IO and make a pure function impure?". Even if the cache is so large that it doesn't fit in memory, its behaviour would still be referentially transparent.
- Veedrac 11y agoThat's only if you don't count the IO itself as a side-effect. Does a language like Haskell give you the choice? If so,would it be idiomatic?
- peterfirefly 11y agoOne you want to keep around between invocations of the program?