Extract cache component into separate classes