C# Class ScrewTurn.Wiki.CacheProvider

Implements a local cache provider. All instance members are thread-safe.
Inheritance: ICacheProviderV30
Afficher le fichier Open project: mono/ScrewTurnWiki Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

AddRedirection() public méthode

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.
Résultat void

CancelEditingSession() public méthode

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.
Résultat void

ClearPageContentCache() public méthode

Clears the Page Content cache.
public ClearPageContentCache ( ) : void
Résultat void

ClearPseudoCache() public méthode

Clears the Pseudo-Cache.
public ClearPseudoCache ( ) : void
Résultat void

ClearRedirections() public méthode

Clears all the redirections information.
public ClearRedirections ( ) : void
Résultat void

CutCache() public méthode

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.
Résultat void

GetFormattedPageContent() public méthode

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.
Résultat string

GetPageContent() public méthode

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.
Résultat ScrewTurn.Wiki.PluginFramework.PageContent

GetPseudoCacheValue() public méthode

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.
Résultat string

GetRedirectionDestination() public méthode

Gets the destination of a redirection.
If source is null. If source is empty.
public GetRedirectionDestination ( string source ) : string
source string The source page.
Résultat string

Init() public méthode

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.
Résultat void

IsPageBeingEdited() public méthode

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.
Résultat bool

RemovePage() public méthode

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.
Résultat void

RemovePageFromRedirections() public méthode

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.
Résultat void

RenewEditingSession() public méthode

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.
Résultat void

SetFormattedPageContent() public méthode

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.
Résultat void

SetPageContent() public méthode

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.
Résultat void

SetPseudoCacheValue() public méthode

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.
Résultat void

Shutdown() public méthode

Method invoked on shutdown.
This method might not be invoked in some cases.
public Shutdown ( ) : void
Résultat void

WhosEditing() public méthode

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.
Résultat string