What is meant by the term “dirty object”?

心不动则不痛 提交于 2019-11-29 04:43:37

问题


I see the term "dirty" or "dirty objects" a lot in programming.
What does this mean?


回答1:


A dirty object is an object that has changed in its content, but this content has not been synchronized back into the database/disk. It's a typical situation of desynchronization between a cache and a storage.




回答2:


EDIT: original question was phrased as I find a lot in "programming dirty", this answer attempts to address that. The accepted answer is about dirty objects, which signifies changed status or content.

"Programming dirty" as you quote it, also means that you use a "quick and dirty" method for solving a problem, usually to stay within time constraints, and hoping to fix it later.

Programming dirty is often used with prototyping (i.e., a mini=-program that shows the principles of a later-to-be-built larger program), where it is needed to show something quickly, but your code is not meant to last.



来源:https://stackoverflow.com/questions/1745888/what-is-meant-by-the-term-dirty-object

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!