Negative cache

Negative cache

In computer programming, negative cache is a cache that also stores "negative" responses, i.e. failures. This means that a program remembers the result indicating a failure even after the cause has been corrected. Usually negative cache is a design choice, but it can also be a software bug.

Examples

Consider a web browser which attempts to load a page while the network is unavailable. The browser will receive an error code indicating the problem, and may display this error message to the user in place of the requested page. However, it is incorrect for the browser to place the error message in the page cache, as this would lead it to display the error again when the user tries to load the same page - even after the network is back up. The error message must not be cached under the page's URL; until the browser is able to successfully load the page, whenever the user tries to load the page, the browser must make a new attempt.

A frustrating aspect of negative caches is that the user may put a great effort into troubleshooting the problem, and then after determining and removing the root cause, the error still does not vanish.

There are cases where failure-like states must be cached. For instance, DNS requires that caching nameservers remember negative responses as well as positive ones. If an authoritative nameserver returns a negative response, indicating that a name does not exist, this is cached. The negative response may be perceived as a failure at the application level; however, to the nameserver caching it, it is not a failure. The cache times for negative and positive caching may be tuned independently.

Description

A negative cache is normally only desired if failure is very expensive and the error condition arises automatically without user's action. It creates a situation where the user is unable to isolate the cause of the failure: despite fixing everything he/she can think of, the program still refuses to work. When a failure is cached, the program should provide a clear indication of what must be done to clear the cache, in addition to a description of the cause of the error. In such conditions a negative cache is an example of a design anti-pattern.

See also



Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Caché (film) — Infobox Film name = Caché caption = director = Michael Haneke producer = Veit Heiduschka writer = Michael Haneke narrator = starring = Juliette Binoche Daniel Auteuil Maurice Bénichou music = None cinematography = Christian Berger editing =… …   Wikipedia

  • Algorithmes De Remplacement Des Lignes De Cache — Il existe différents types de mémoire cache, dont l organisation amène des situations où une ligne de la mémoire principale est mappé sur un ensemble de lignes de mémoire cache remplie. Il faut donc choisir la ligne de mémoire cache qui sera… …   Wikipédia en Français

  • Algorithmes de remplacement des lignes de cache — Il existe différents types de mémoire cache, dont l organisation amène des situations où une ligne de la mémoire principale est mappée sur un ensemble de lignes de mémoire cache remplie. Il faut donc choisir la ligne de mémoire cache qui sera… …   Wikipédia en Français

  • Réaction thérapeutique négative — Décrite par Freud en 1923 comme résistance à la guérison par la psychanalyse. Il décrit certain patients qui ne supportent pas le progrès du traitement ou les paroles d encouragement que l analyste a cru bon, à un moment donné, de leur offrir, et …   Wikipédia en Français

  • Geocaching — Ein Geocache Behälter Geocaching (von griechisch γη, geo „Erde“ und englisch cache „geheimes Lager“ (gesprochen: [ dʒiːoʊ̯kæʃɪŋ], in Deutschland zumeist [ geːokɛʃɪŋ])), auch GPS Schnitzeljagd genannt, ist eine Art elektronische Scha …   Deutsch Wikipedia

  • Domain Name System — The Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network. It associates various information with domain names assigned to each of the… …   Wikipedia

  • Health realization — (HR) is a resiliency approach to personal and community psychology [Mills, R: Realizing Mental Health: Toward a new Psychology of Resiliency , Sulberger Graham Publishing, Ltd. 1995.] first developed in the 1980s by Roger C. Mills and George… …   Wikipedia

  • DIEU - L’affirmation de Dieu — Le mot «Dieu» désigne la réalité mystérieuse que les hommes cherchent à tâtons depuis les origines. L’histoire des religions peut permettre de repérer les conditions concrètes qui ont favorisé cette fonction théogénique dont l’origine renvoie à… …   Encyclopédie Universelle

  • cacher — 1. cacher [ kaʃe ] v. tr. <conjug. : 1> • XIIIe; lat. pop. °coacticare « comprimer, serrer », lat. class. coactare « contraindre » I ♦ V. tr. 1 ♦ Soustraire, dérober à la vue; mettre dans un lieu où on ne peut trouver. ⇒ camoufler, vx celer …   Encyclopédie Universelle

  • Mississippian culture pottery — is the ceramic tradition of the Mississippian culture (800 to 1600 CE) found as artifacts in archaeological sites in the American Midwest and Southeast. It is often characterized by the adoption and use of riverine (or more rarely marine) shell… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”