Attempt to cache an object, after loading from the database
Namespace:
NHibernate.CacheAssembly: NHibernate (in NHibernate.dll)
Syntax
Visual Basic (Declaration) |
---|
Function Put ( _ key As CacheKey, _ value As Object, _ txTimestamp As Long, _ version As Object, _ versionComparer As IComparer, _ minimalPut As Boolean _ ) As Boolean |
C# |
---|
bool Put( CacheKey key, Object value, long txTimestamp, Object version, IComparer versionComparer, bool minimalPut ) |
Visual C++ |
---|
bool Put( CacheKey^ key, Object^ value, long long txTimestamp, Object^ version, IComparer^ versionComparer, bool minimalPut ) |
JavaScript |
---|
function put(key, value, txTimestamp, version, versionComparer, minimalPut); |
Parameters
- key
- Type: NHibernate.Cache..::.CacheKey
The key (id) of the object to put in the Cache.
- value
- Type: System..::.Object
The value
- txTimestamp
- Type: System..::.Int64
A timestamp prior to the transaction start time
- version
- Type: System..::.Object
the version number of the object we are putting
- versionComparer
- Type: System.Collections..::.IComparer
a Comparer to be used to compare version numbers
- minimalPut
- Type: System..::.Boolean
indicates that the cache should avoid a put if the item is already cached
Return Value
trueTruetruetrue (True in Visual Basic) if the object was successfully cached
Exceptions
Exception | Condition |
---|---|
NHibernate.Cache..::.CacheException |