1. A method implemented in a computer infrastructure and comprising: receiving an object requiring caching from an application server; detecting that an object encryption is activated for the object; inspecting an annotation for an attribute of the object, which indicates a type of encryption supported for the attribute; determining that the attribute of the object requires encryption using a first type of encryption based on the inspecting; encrypting the attribute of the object that requires encryption using the first type of encryption; serializing and caching the object and the attribute encrypted with the first type of encryption in a cache storage; changing the first type of encryption to a second type of encryption as indicated by the annotation; discarding the object and the attribute encrypted with the first type of encryption from the cache storage upon changing the first type of encryption to the second type of encryption; encrypting the attribute of the object that requires encryption using the second type of encryption; and serializing and caching the object and the attribute encrypted with the second type of encryption in the cache storage, wherein the computer infrastructure comprises a computing device including a caching engine that performs at least the receiving, the detecting, the inspecting, the determining, the encrypting, and the serializing and caching.