caching - 缓存和记忆化有什么区别?

标签 caching terminology memoization

我想知道缓存内存之间的实际区别是什么。
在我看来,两者都涉及通过存储数据来避免重复的函数调用来获取数据。

两者的核心区别是什么?

最佳答案

记忆化是一种特定形式的缓存,涉及根据函数的参数缓存函数的返回值

缓存是一个更通用的术语;例如,HTTP 缓存是缓存,但不是内存。

维基百科 says :

Although related to caching, memoization refers to a specific case of this optimization, distinguishing it from forms of caching such as buffering or page replacement.

关于caching - 缓存和记忆化有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6469437/

相关文章:

math - 0.0 - 1.0 值范围的命名约定?

caching - channel 并发保证

data-structures - 无缓存数据结构和动态语言——有效吗?

caching - 高并发环境下NoSQL+分布式缓存的数据一致性

javascript - 如何缓存图标javascript

html - 制作 HTML5 AssetLoader,浏览器是否总是缓存图像?

sql - 在数据库术语方面需要帮助

javascript - "Waiting"在使用 native (ES6) JavaScript promise 的 promise 或常规对象上

algorithm - 如果成本与使用每个数字相关联,则找出最大数量

python - LeetCode 509 : Fibonacci Number "int object not subscriptable"