Caching: Guidelines

This page provides caching guidelines, based on what appears to work best.

General

  • Consider providing a caching mechanism for each service endpoint
    • For dynamic data, the requested data is likely to change seconds later. It still pays to keep a short-lived local version.
  • Consider providing a mechanism that does incremental updates
    • Whereas some service endpoints return an entire list of objects at a time, others return only one specific object at a time. Either way, provide the means necessary to calculate, retrieve and store only the difference between the cached and live data.
  • Do set an expiration date for cached data.
    • For static data, entire months can go by without a change.
    • For dynamic data, the cached data goes stale within seconds to minutes.
  • Do associate data with build numbers.
  • Do not rely on cached data that is associated with a superseded build number.

/v1/build.json

  • Build numbers change weekly or more.
  • Use the build number to to help determine the validity of cached data.

/v1/colors.json

  • Static data.
  • Data may change between different builds.
  • New data may become available between different builds.

/v1/continents.json

  • Static data.
  • Data may change between different builds.
  • New data may become available between different builds.

/v1/event_names.json

  • Static data.
  • Data may change between different builds.
  • New data may become available between different builds.

/v1/event_details.json

  • Static data.
  • Data may change between different builds.
  • New data may become available between different builds.

/v1/events.json

  • Dynamic data.
  • Data reflects the in-game state at a particular point in time.

/v1/files.json

  • Static data.
  • Data may change whenever.
  • New data may become available whenever.

/v1/guild_details.json

  • Static data.
  • Data changes only when a guild official changes their guild settings.
  • New data becomes available when guilds are created.

/v1/items.json

  • Static data.
  • Data may change between different builds.
  • New data may become available as items are discovered.

/v1/item_details.json

  • Static data.
  • Data may change between different builds.
  • New data may become available as items are discovered.

/v1/map_floor.json

  • Static data.
  • Data may change between different builds.
  • New data may become available between different builds.

/v1/map_names.json

  • Static data.
  • Data may change between different builds.
  • New data may become available between different builds.

/v1/maps.json

  • Static data.
  • Data may change between different builds.
  • New data may become available between different builds.

/v1/recipes.json

  • Static data.
  • Data may change between different builds.
  • New data may become available as recipes are discovered.

/v1/recipe_details.json

  • Static data.
  • Data may change between different builds.
  • New data may become available as recipes are discovered.

/v1/world_names.json

  • Static data.

/v1/wvw/matches.json

  • Dynamic data.
  • Data reflects the in-game state at a particular point in time.

/v1/wvw/match_details.json

  • Dynamic data.
  • Data reflects the in-game state at a particular point in time.

/v1/wvw/objective_names.json

  • Static data.
  • Data may change between different builds.
  • New data may become available between different builds.

Last edited Mar 21, 2014 at 5:55 PM by StevenLiekens, version 4