final public function prepare_to_cache() {
        $result = array();
        foreach ($this as $key => $value) {
            if ($value instanceof cacheable_object) {
                $value = new cache_cached_object($value);
            } else {
                throw new coding_exception('Only cacheable_object instances can be added to a cacheable_array');
            }
            $result[$key] = $value;
        }
        return $result;
    }