How can I programatically invalidate the outputcache from a usercontrol

You could add a dependency to the output cached control, and change the dependency to evict the control. Here’s code to do that: VB.NET If TypeOf Parent Is System.Web.UI.BasePartialCachingControl Then Cache(‘dependent’) = ‘dependent’ Dim dep As New CacheDependency(Nothing, New String() {‘dependent’}) ’ CType(Parent, System.Web.UI.BasePartialCachingControl).Dependency = dep End If C# if (Parent is System.Web.UI.BasePartialCachingControl) { Cache[‘dependent’] = ‘dependent’; CacheDependency dep = new CacheDependency(null, new string[] ‘dependent’); ((System.Web.UI.BasePartialCachingControl)Parent).Dependency = dep; }

Is caching PDF Files a good or bad idea

If the PDF files are on the disk, you should just let the IIS handle them. The IIS static file handler performs caching and is much faster than the ASP.NET cache.