Cache hit ratio is improved in a cache apparatus that reads and caches
contents from a large-scale database. The cache apparatus includes a
cache section for recording a plurality of sets. Each set includes an
attribute ID, an extractor for extracting the attribute ID from an object
ID, and attribute data identified by the attribute ID. The cache
apparatus receives an object ID and extracts an attribute ID from the
object ID using an extractor recorded in the cache section. If the
extracted attribute ID coincides with attribute ID cached in association
with the extractor, the cache apparatus returns attribute data recorded
in association with the extractor. On the other hand, if the extracted
attribute ID does not coincide with the attribute ID recorded in
association with the extractor, the cache apparatus receives attribute
data and an extractor from a DB using the object ID, and caches the read
extractor and attribute data in the cache section in association with
attribute ID.