Idempotence (pron.: /ˌaɪdɨmˈpoʊtəns/ eye-dəm-poh-təns) is the property of certain operations in mathematics and computer science, that they can be applied multiple times without changing the result beyond the initial application.
幂等是指重复调用多次操作和进行一次操作的结果是一致的。
用户更新数据时,修改了database数据的同时需要修改memcache,facebook这篇文章里面推荐用delete key的方法来更新cache,而不是直接update.
http://share.pdfonline.com/d322760027ca403baa4847d5fe4c6549/Scaling%20Memcached%20at%20Facebook.htm
对于单目运算/函数,如果一个运算/函数对于在范围内的所有的一个数多次进行该运算所得的结果和进行一次该运算所得的结果是一样的,那么我们就称该运算/函数是幂等的。比如绝对值运算就是一个例子,在实数集中,有abs(a)=abs(abs(a)),[1]