You might consider expressing it as a directive at the top of the ascx:
<%@ OutputCache Duration="1800" VaryByParam="None" VaryByCustom="mykey" %>
The answer is a property of the page, not of the control, so it is possible that it does not affect the control layer.
a source
to share