C# Класс ScrewTurn.Wiki.CacheProvider

Implements a local cache provider. All instance members are thread-safe.
Наследование: ICacheProviderV30
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddRedirection ( string source, string destination ) : void

Adds the redirection information for a page (overwrites the previous value, if any).

CancelEditingSession ( string page, string user ) : void

Cancels an editing session.

ClearPageContentCache ( ) : void

Clears the Page Content cache.

ClearPseudoCache ( ) : void

Clears the Pseudo-Cache.

ClearRedirections ( ) : void

Clears all the redirections information.

CutCache ( int cutSize ) : void

Reduces the size of the Page Content cache, removing the least-recently used items.

GetFormattedPageContent ( System.PageInfo pageInfo ) : string

Gets the partially-formatted content (text) of a Page, previously stored in the cache.

GetPageContent ( System.PageInfo pageInfo ) : PageContent

Gets the Content of a Page, previously stored in cache.

GetPseudoCacheValue ( string name ) : string

Gets the value of a Pseudo-cache item, previously stored in the cache.

GetRedirectionDestination ( string source ) : string

Gets the destination of a redirection.

Init ( IHostV30 host, string config ) : void

Initializes the Storage Provider.

IsPageBeingEdited ( string page, string currentUser ) : bool

Finds whether a Page is being edited by a different user.

RemovePage ( System.PageInfo pageInfo ) : void

Removes a Page from the cache.

RemovePageFromRedirections ( string name ) : void

Removes a pge from both sources and destinations.

RenewEditingSession ( string page, string user ) : void

Adds or updates an editing session.

SetFormattedPageContent ( System.PageInfo pageInfo, string content ) : void

Sets the partially-preformatted content (text) of a Page.

SetPageContent ( System.PageInfo pageInfo, PageContent content ) : void

Sets the Content of a Page.

SetPseudoCacheValue ( string name, string value ) : void

Sets the value of a Pseudo-cache item.

Shutdown ( ) : void

Method invoked on shutdown.

This method might not be invoked in some cases.

WhosEditing ( string page ) : string

Gets the username of the user who's editing a page.

Описание методов

AddRedirection() публичный Метод

Adds the redirection information for a page (overwrites the previous value, if any).
If source or destination are null. If source or destination are empty.
public AddRedirection ( string source, string destination ) : void
source string The source page.
destination string The destination page.
Результат void

CancelEditingSession() публичный Метод

Cancels an editing session.
If page or user are null. If page or user are empty.
public CancelEditingSession ( string page, string user ) : void
page string The Page.
user string The User.
Результат void

ClearPageContentCache() публичный Метод

Clears the Page Content cache.
public ClearPageContentCache ( ) : void
Результат void

ClearPseudoCache() публичный Метод

Clears the Pseudo-Cache.
public ClearPseudoCache ( ) : void
Результат void

ClearRedirections() публичный Метод

Clears all the redirections information.
public ClearRedirections ( ) : void
Результат void

CutCache() публичный Метод

Reduces the size of the Page Content cache, removing the least-recently used items.
If cutSize is less than or equal to zero.
public CutCache ( int cutSize ) : void
cutSize int The number of Pages to remove.
Результат void

GetFormattedPageContent() публичный Метод

Gets the partially-formatted content (text) of a Page, previously stored in the cache.
If pageInfo is null.
public GetFormattedPageContent ( System.PageInfo pageInfo ) : string
pageInfo System.PageInfo The Page Info object related to the content being requested.
Результат string

GetPageContent() публичный Метод

Gets the Content of a Page, previously stored in cache.
If pageInfo is null.
public GetPageContent ( System.PageInfo pageInfo ) : PageContent
pageInfo System.PageInfo The Page Info object related to the Content being requested.
Результат ScrewTurn.Wiki.PluginFramework.PageContent

GetPseudoCacheValue() публичный Метод

Gets the value of a Pseudo-cache item, previously stored in the cache.
If name is null. If name is empty.
public GetPseudoCacheValue ( string name ) : string
name string The name of the item being requested.
Результат string

GetRedirectionDestination() публичный Метод

Gets the destination of a redirection.
If source is null. If source is empty.
public GetRedirectionDestination ( string source ) : string
source string The source page.
Результат string

Init() публичный Метод

Initializes the Storage Provider.
If host or config are null. If config is not valid or is incorrect.
public Init ( IHostV30 host, string config ) : void
host IHostV30 The Host of the Component.
config string The Configuration data, if any.
Результат void

IsPageBeingEdited() публичный Метод

Finds whether a Page is being edited by a different user.
If page or currentUser are null. If page or currentUser are empty.
public IsPageBeingEdited ( string page, string currentUser ) : bool
page string The Page.
currentUser string The User who is requesting the status of the Page.
Результат bool

RemovePage() публичный Метод

Removes a Page from the cache.
If pageInfo is null.
public RemovePage ( System.PageInfo pageInfo ) : void
pageInfo System.PageInfo The Page Info object related to the Page that has to be removed.
Результат void

RemovePageFromRedirections() публичный Метод

Removes a pge from both sources and destinations.
If name is null. If name is empty.
public RemovePageFromRedirections ( string name ) : void
name string The name of the page.
Результат void

RenewEditingSession() публичный Метод

Adds or updates an editing session.
If page or user are null. If page or user are empty.
public RenewEditingSession ( string page, string user ) : void
page string The edited Page.
user string The User who is editing the Page.
Результат void

SetFormattedPageContent() публичный Метод

Sets the partially-preformatted content (text) of a Page.
If pageInfo or content are null.
public SetFormattedPageContent ( System.PageInfo pageInfo, string content ) : void
pageInfo System.PageInfo The Page Info object related to the content being stored.
content string The partially-preformatted content.
Результат void

SetPageContent() публичный Метод

Sets the Content of a Page.
If pageInfo or content are null.
public SetPageContent ( System.PageInfo pageInfo, PageContent content ) : void
pageInfo System.PageInfo The Page Info object related to the Content being stored.
content ScrewTurn.Wiki.PluginFramework.PageContent The Content of the Page.
Результат void

SetPseudoCacheValue() публичный Метод

Sets the value of a Pseudo-cache item.
If name is null. If name is empty.
public SetPseudoCacheValue ( string name, string value ) : void
name string The name of the item being stored.
value string The value of the item. If the value is null, then the item should be removed from the cache.
Результат void

Shutdown() публичный Метод

Method invoked on shutdown.
This method might not be invoked in some cases.
public Shutdown ( ) : void
Результат void

WhosEditing() публичный Метод

Gets the username of the user who's editing a page.
If page is null. If page is empty.
public WhosEditing ( string page ) : string
page string The page.
Результат string