IBM WEBSPHERE 6.1.X Manual de usuario Pagina 66

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 97
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 65
61
WE BSPHERE PORTAL V6.1 TUNING GUIDE
Cache Usage Patterns
Most WebSphere Portal caches follow the simple paradigm: if an entry already exists use it,
otherwise add the entry. However, there are caches that behave differently. Each cache
follows one of the following four patterns:
Pattern: regular
The regular pattern, described earlier, is the most common cache pattern:
value = cache.get(key);
if (value == null) {
value = calculateNewValue();
cache.put(key, value);
}
Pattern: invalidation checking
Invalidating cache entries in a clustered environment is rather expensive. Therefore, portal caches often check whether the entry to be
invalidated actually exists in the local cache.
test = cache.get(key);
if (test != null) {
cache.invalidate(key);
}
Caches following this pattern follow the regular pattern for all but invalidation
actions.
Pattern: multiple object types
Most caches hold only a single object type. When caches can hold multiple types,
they follow the regular pattern for each of those types.
Pattern: cascading object types
This pattern is a special case of the ‘multiple object types’ pattern in that two or more object types that are queried in a certain order are
stored in a single cache. There may be one cache hit along with a cache miss on a regular basis.
value = cache.get(keyA);
if (value == null) {
value = cache.get(keyB);
if (value == null) {
value = calculateNewValue();
cache.put(keyA || keyB, value); // either key could be used
}
}
Vista de pagina 65
1 2 ... 61 62 63 64 65 66 67 68 69 70 71 ... 96 97

Comentarios a estos manuales

ChrisCaddy 27 Apr 2024 | 05:14:13

Hello, im noob :)