C# 클래스 ScrewTurn.Wiki.CacheProvider

Implements a local cache provider. All instance members are thread-safe.
상속: ICacheProviderV30
파일 보기 프로젝트 열기: mono/ScrewTurnWiki 1 사용 예제들

공개 메소드들

메소드 설명
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