# SSR has 100% miss on AST print cache

**URL:** <https://community.apollographql.com/t/ssr-has-100-miss-on-ast-print-cache/9475>\
**Category:** Client SDKs\
**Tags:** client, server, web\
**Created:** [October 2, 2025, 10:34am UTC](https://community.apollographql.com/t/ssr-has-100-miss-on-ast-print-cache/9475 "2025-10-02T10:34:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joeyciechanowicz](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/joeyciechanowicz/32/1882_2.png) [@joeyciechanowicz](https://community.apollographql.com/u/joeyciechanowicz)\
**Post date:** [October 2, 2025, 10:34am UTC](https://community.apollographql.com/t/ssr-has-100-miss-on-ast-print-cache/9475/1 "2025-10-02T10:34:27Z")

</div>

When server-side rendering I’ve noticed that a lot of memory allocation and CPU time is spent printing the query AST.

The printer does have a cache, but you get a 100% cache miss rate as the query gets transformed by the `QueryManager.documentTransform`.  
Document Transforms also have a cache, however it’s empty as we create a new Apollo Client on each request (as per the docs).

Is there some way to avoid clearing the Document Transformer caches, or serialize them between clients?
