Maximizing.ASP.dot.NET.Real.World.ObjectOriented.Development [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Maximizing.ASP.dot.NET.Real.World.ObjectOriented.Development [Electronic resources] - نسخه متنی

Jeffrey Putz

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Fragment Caching


The OutputCache directive, placed in pages and user controls, causes the rendered contents to be cached in memory, without any of the page or user control code executing on the new request. This is certainly an outstanding way to save resource use because it reads the content from memory instead of going through the process of executing code and all the object instantiation that this involves.

However, in a world of dynamic sites with personalized and frequently changing data, it's not practical to cache an entire page. Fragment caching is the process of caching only a user control. User controls are essentially "fragments" of pages, with their own execution, so we can cluster content into these smaller units and cache them. The rest of the page hosting a user control can execute normally.

Caching user controls works just like caching a page, by placing the OutputCache directive right after the Control directive:


<%@ OutputCache Duration="120" VaryByParam="None" %>


/ 146