EPiWiki.se  - EPiServer notes shared with others
 

Custom page provider

[Edit]
EPiServers custom page providers introduce a new set of issues for a web site sense it combines EPiServers local page handling with the customer developed data layer.

Common problems


Versioning


The save method is complex to implement, and if it handles the versioning in a different way than EPiServers local page provider it’s not possible to ensure that it going to work with all code written to work with the local page provider (I haven’t seen any page provider that implement versioning in exact the same way as EPiServer local page provider yet). One way of solving this is to following the PageData gaph Mattias writes about in his blog
Version state graph of a PageData object

Caching


Sense the page provider is used by the DataFactory that caches page data, the page data will be cached twice if your custom page provider deliver pages from local page providers. Johan has written a blog post about it:
PageProvider Control the page cache
The cache for custom page providers are set in remotePageCacheSlidingExpiration attribute in the episerver.config file.

Routing


Sense the custom page provider has functionality that looks up PageData object by its GUID it’s hard to implement the method ResolveLocalPage(GUID, out Pagereferense) without calling the underlying system. This mean that each defined page provider are going to hit the underlying system at least once if the last page provider is queried (by default the local page provider is the last provider that is called – it can be configured)
  
Version author:
Mattias Lövström

EPiServer version

'CMS 5 R2' 'EPiServer CMS 6'