Top Method Summary
Options Name Purpose
ClearCache () Clears the Cache
ClearPersistentCache () Removes all repository data from the persistent cache
DeleteCacheFiles (character) Deletes cache files and variant codes files in the sub folders of the cache folder
LOGICAL FindCacheEntry (character, character, logical, character) Positions the ttCache buffer on the entry of a request
CHARACTER GetCacheCustomizationResultCodes (character, character) Returns the customization result codes that select the file of the persistent cache for a request
CHARACTER GetCacheFileName (character, character, character) Returns the name of a file of the persistent cache
CHARACTER GetCacheFolderName (character) Returns the name of the sub folder of the persistent cache that holds the repository data for a list of customization result codes
HANDLE GetRepositoryData (FetchRepositoryObjectParameter) Retrieves repository data from the cache
CHARACTER GetRequestCustomizationResultCodes (character) Returns the customization result codes of a request
CHARACTER GetSessionCustomizationResultCodes () Returns the customization result codes of the current session
HANDLE GetTranslatedRepositoryData (FetchRepositoryObjectParameter, character) Retrieves translated repository data from the cache
CHARACTER GetVariantCodesFileName (character, character) Returns the name of the variant codes file of a container in the persistent cache
LOGICAL HasCustomizeRepositoryData (handle) Returns if the container of the repository data customizes its repository data
PurgeExpiredEntries () Removes the entries that are older than RepositoryCacheMaxAge
RemoveRepositoryData (character) Removes the repository data of a container from the cache
HANDLE RetrieveCacheFromDisc (character, character) Attempts to retrieve repository data from the persistent cache
SessionCustomizationChangedHandler () Event handler for the AfterLogin and LoginCompanyKeyChanged events of the SessionManager
StorePersistentRepositoryData (character, character, character, handle) Stores the repository data of a container in the persistent cache
StoreRepositoryData (FetchRepositoryObjectParameter, handle) Stores repository data in the cache
StoreTranslatedRepositoryData (FetchRepositoryObjectParameter, character, handle) Stores translated repository data in the cache
TranslateRepositoryData (handle) Translates repository data read from the persistent cache
VerifyPersistentCacheDatabase () Verifies that the persistent cache was written for the SmartDB of the session

Top Constructor Summary
Options Name Purpose
SmartRepositoryCache () Constructor for the SmartRepositoryCache class

Top Property Summary
Options Name Purpose
CHARACTER RepositoryCacheFolder
LOGICAL WriteOnFetch


Method Detail
Top

ClearCache ()

Purpose: Clears the Cache
Notes:

Top

ClearPersistentCache ()

Purpose: Removes all repository data from the persistent cache
Notes: SCL-6284: Deletes the cache files (.xml) and the variant codes
files (.codes) in the sub folders of the cache folder and clears
the in-memory cache

Top

DeleteCacheFiles (character)

Purpose: Deletes cache files and variant codes files in the sub folders of
the cache folder
Notes: SCL-6284

Parameters:
pcFileName CHARACTER
The name of the files without the extension, "*" for all files
Top

LOGICAL FindCacheEntry (character, character, logical, character)

Purpose: Positions the ttCache buffer on the entry of a request
Notes: SCL-6349: Tests the entry of the customization result code of the
request first and then the entry read from the persistent cache
the codes of the request resolved to before (ttCacheAlias). The
alias is keyed by the codes of the request, the codes of the
session for the unknown value - those change with the login

Parameters:
pcContainerName CHARACTER
The name (or ObjectMasterGuid) of the container
pcCustomizationResultCode CHARACTER
The customization result code of the request
plFetchChildDetails LOGICAL
The FetchChildDetails flag of the request
pcPages CHARACTER
The comma delimited list of the pages of the request, ? for all pages
Returns LOGICAL
Logical value indicating if the cache holds an entry for the request
Top

CHARACTER GetCacheCustomizationResultCodes (character, character)

Purpose: Returns the customization result codes that select the file of
the persistent cache for a request
Notes: SCL-6282: The codes of the request in their prioritized order (the
codes of the session for the unknown value), reduced to the codes
for which the container or one of the objects it contains has a
customized variant. Those codes are read from the variant codes
file the RepositoryCacheGenerator writes for every container. A
cache without that file can only answer requests without codes

Parameters:
pcContainerName CHARACTER
The name of the container
pcCustomizationResultCode CHARACTER
The customization result code of the request (?, "" or a comma delimited list of codes)
Returns CHARACTER
The comma delimited list of customization result codes, ? when the persistent cache cannot answer the request
Top

CHARACTER GetCacheFileName (character, character, character)

Purpose: Returns the name of a file of the persistent cache
Notes: SCL-6282: <cache folder>/<folder of the codes>/<container name>.xml

Parameters:
pcCacheFolder CHARACTER
The folder of the persistent cache
pcContainerName CHARACTER
The name of the container
pcCustomizationResultCodes CHARACTER
The comma delimited list of customization result codes the file holds the repository data for
Returns CHARACTER
The name of the file
Top

CHARACTER GetCacheFolderName (character)

Purpose: Returns the name of the sub folder of the persistent cache that
holds the repository data for a list of customization result codes
Notes: SCL-6282: "Default" for the base (no code), the code for a single
code and the codes delimited by "+" for several codes

Parameters:
pcCustomizationResultCodes CHARACTER
The comma delimited list of customization result codes
Returns CHARACTER
The name of the sub folder
Top

HANDLE GetRepositoryData (FetchRepositoryObjectParameter)

Purpose: Retrieves repository data from the cache
Notes: The caller is responsible for deleting the returned ProDataset
SCL-6285: The in-memory cache is tested first. A request that is
not held in memory is read from the persistent cache and stored
in the in-memory cache, where it is subject to
RepositoryCacheMaxAge like every other entry
SCL-6282: The persistent cache answers requests for all pages
with child details, with the file of the customization result
codes of the request that select a customized variant

Parameters:
poFetchRepositoryObjectParameter Consultingwerk.SmartFramework.Repository.FetchRepositoryObjectParameter
The FetchRepositoryObjectParameter of the request
Returns HANDLE
The dataset with the repository data
Top

CHARACTER GetRequestCustomizationResultCodes (character)

Purpose: Returns the customization result codes of a request
Notes: SCL-6349: The codes of the session for the unknown value, never
the unknown value

Parameters:
pcCustomizationResultCode CHARACTER
The customization result code of the request (?, "" or a comma delimited list of codes)
Returns CHARACTER
The comma delimited list of customization result codes, an empty string when there are none
Top

CHARACTER GetSessionCustomizationResultCodes ()

Purpose: Returns the customization result codes of the current session
Notes: SCL-5901: The codes resolved by the ICustomizationResultService at
login (SCL-5898), kept in SessionManager:CustomizationResultCodes.
When the codes have not been resolved yet and the service is
registered, the service resolves them now

Returns CHARACTER
The comma delimited list of customization result codes in prioritized order, an empty string when the session has none
Top

HANDLE GetTranslatedRepositoryData (FetchRepositoryObjectParameter, character)

Purpose: Retrieves translated repository data from the cache
Notes: SCL-6349: The caller is responsible for deleting the returned
ProDataset. The translated entry is only returned while the
untranslated entry it was translated from exists

Parameters:
poFetchRepositoryObjectParameter Consultingwerk.SmartFramework.Repository.FetchRepositoryObjectParameter
The FetchRepositoryObjectParameter of the request (as passed to GetRepositoryData)
pcLanguageKey CHARACTER
The key of the language of the translation
Returns HANDLE
The dataset with the translated repository data, ? when the cache does not hold it
Top

CHARACTER GetVariantCodesFileName (character, character)

Purpose: Returns the name of the variant codes file of a container in the
persistent cache
Notes: SCL-6282: <cache folder>/Default/<container name>.codes, the comma
delimited list of the customization result codes for which the
container or one of the objects it contains has a customized variant

Parameters:
pcCacheFolder CHARACTER
The folder of the persistent cache
pcContainerName CHARACTER
The name of the container
Returns CHARACTER
The name of the file
Top

LOGICAL HasCustomizeRepositoryData (handle)

Purpose: Returns if the container of the repository data customizes its
repository data
Notes: SCL-6284: The CustomizeRepositoryData attribute of the container

Parameters:
phDataset HANDLE
The dataset with the repository data
Returns LOGICAL
Logical value indicating if the CustomizeRepositoryData attribute of the container is set
Top

PurgeExpiredEntries ()

Purpose: Removes the entries that are older than RepositoryCacheMaxAge
Notes: SCL-6349: Removes the expired translated entries as well. An
alias that points to a removed entry is ignored by FindCacheEntry
and replaced with the next request

Top

RemoveRepositoryData (character)

Purpose: Removes the repository data of a container from the cache
Notes: SCL-5901: Removes the entries of all customization result codes,
page selections and child detail modes of the container. Used
when the base object master or one of its customized variants
has been changed
SCL-6284: Deletes the files of the container in the persistent
cache as well

Parameters:
pcContainerName CHARACTER
The name (or ObjectMasterGuid) of the container as passed in the FetchRepositoryObjectParameter
Top

HANDLE RetrieveCacheFromDisc (character, character)

Purpose: Attempts to retrieve repository data from the persistent cache
Notes: The caller is responsible for deleting the returned ProDataset
SCL-6282: Reads the file of the container for the given
customization result codes, see GetCacheFileName

Parameters:
pcContainerName CHARACTER
The name of the container
pcCustomizationResultCodes CHARACTER
The comma delimited list of customization result codes that select the file, an empty string for the base
Returns HANDLE
The dataset with the repository data, ? when the persistent cache does not hold the file
Top

SessionCustomizationChangedHandler ()

Purpose: Event handler for the AfterLogin and LoginCompanyKeyChanged
events of the SessionManager
Notes: SCL-5901: The customization result codes of a client session
change with the login and the login company, the cached data of
a client session was resolved for the previous codes. In a
session with a SmartDB connection the entries are keyed by the
resolved customization result code and remain valid

Top

StorePersistentRepositoryData (character, character, character, handle)

Purpose: Stores the repository data of a container in the persistent cache
Notes: SCL-6284: Only when the RepositoryCacheWriteOnFetch setting is set
and the persistent cache does not hold the file yet. The file is
written under a temporary name and renamed, sessions that share
the cache folder never read an incomplete file. A file that
cannot be written is logged and does not fail the request

Parameters:
pcContainerName CHARACTER
The name (or ObjectMasterGuid) of the container as passed in the FetchRepositoryObjectParameter
pcCustomizationResultCodes CHARACTER
The comma delimited list of the customization result codes that select a customized variant in the repository data, an empty string for the base
pcVariantCodes CHARACTER
The comma delimited list of the customization result codes for which the container or one of the objects it contains has a customized variant
phDataset HANDLE
The dataset with the repository data
Top

StoreRepositoryData (FetchRepositoryObjectParameter, handle)

Purpose: Stores repository data in the cache
Notes: Creates a copy of the passed in ProDataset

Parameters:
poFetchRepositoryObjectParameter Consultingwerk.SmartFramework.Repository.FetchRepositoryObjectParameter
The FetchRepositoryObjectParameter of the request
phDataset HANDLE
The dataset with the repository data
Top

StoreTranslatedRepositoryData (FetchRepositoryObjectParameter, character, handle)

Purpose: Stores translated repository data in the cache
Notes: SCL-6349: Creates a copy of the passed in ProDataset. Only stored
when the cache holds the untranslated entry of the request, the
translated entry is bound to that entry

Parameters:
poFetchRepositoryObjectParameter Consultingwerk.SmartFramework.Repository.FetchRepositoryObjectParameter
The FetchRepositoryObjectParameter of the request (as passed to StoreRepositoryData)
pcLanguageKey CHARACTER
The key of the language of the translation
phDataset HANDLE
The dataset with the translated repository data
Top

TranslateRepositoryData (handle)

Purpose: Translates repository data read from the persistent cache
Notes: SCL-6283: Uses the IRepositoryTranslationService when registered

Parameters:
phDataset HANDLE
The dataset with the repository data
Top

VerifyPersistentCacheDatabase ()

Purpose: Verifies that the persistent cache was written for the SmartDB of
the session
Notes: SCL-6284: Only when the RepositoryCacheWriteOnFetch setting is set
and the session is connected to the SmartDB, once per session.
The cache folder holds the name of the database in the file
database.stamp. A cache that was written for a different database
(e.g. the SmartDB of another branch) is emptied



Constructor Detail
Top

SmartRepositoryCache ()

Purpose: Constructor for the SmartRepositoryCache class
Notes: SCL-5901: Subscribes to the login events of the session, the
customization result codes of a client session change with the
login and the login company



Property Detail
Top

CHARACTER RepositoryCacheFolder


Returns CHARACTER
Top

LOGICAL WriteOnFetch


Returns LOGICAL


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       24.11.2026 10:08:04