From a software architecture point it usually makes sense to have caching logic in an attached cache object (with a reusable implementation) instead of having cache methods such as get,set,flush etc. in the object itself.
See e.g.
https://github.com/owncloud/core/commit/a19a77d3eb94f64274a8ca17985499fb59256cbb https://github.com/owncloud/core/commit/8100f14b3eeebf3c0e72c4dc7941668e3220dcd7
and somewhat
https://github.com/owncloud/core/pull/7897#issuecomment-42011050
This is likely not going to happen for master, of course.