• Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Try Playground
  • Alachisoft.NCache.Client
  • ICache
  • Methods
  • Get
Show / Hide Table of Contents
  • Alachisoft.NCache.Client
    • CacheClearedCallback
    • CacheCollection
      • Constructors
        • CacheCollection
      • Properties
        • Count
        • Item
      • Methods
        • GetEnumerator
    • CacheConnection
      • Constructors
        • CacheConnection
      • Properties
        • Port
        • Server
        • UserCredentials
      • Methods
        • Clone
    • CacheConnectionOptions
      • Properties
        • AppName
        • ClientBindIP
        • ClientCacheMode
        • ClientRequestTimeOut
        • CommandRetries
        • CommandRetryInterval
        • ConnectionRetries
        • ConnectionTimeout
        • DefaultReadThruProvider
        • DefaultWriteThruProvider
        • EnableClientLogs
        • EnableKeepAlive
        • KeepAliveInterval
        • LoadBalance
        • LoadBalancerConnectionRetries
        • LogLevel
        • Mode
        • RetryConnectionDelay
        • RetryInterval
        • RetryL1ConnectionInterval
        • ServerList
        • SkipUnAvailableClientCache
        • UserCredentials
      • Methods
        • Clone
    • CacheDataNotificationCallback
    • CacheEventArg
      • Properties
        • CacheItemRemovedReason
        • Descriptor
    • CacheEventDescriptor
      • Properties
        • CacheDataNotificationCallback
        • CacheName
        • DataFilter
        • IsRegistered
        • RegisteredAgainst
    • CacheItem
      • Constructors
        • CacheItem
      • Properties
        • CreationTime
        • Dependency
        • Expiration
        • Group
        • LastModifiedTime
        • NamedTags
        • Priority
        • ResyncOptions
        • SyncDependency
        • Tags
        • Version
      • Methods
        • Clone
        • GetValue
        • SetCacheDataNotification
        • SetValue
    • CacheItemRemovedReason
    • CacheItemVersion
      • Properties
        • Version
      • Methods
        • CompareTo
        • Equals
        • ToString
    • CacheManager
      • Properties
        • Caches
      • Methods
        • GetCache
        • GetCacheClients
        • GetCacheHealth
        • StartCache
        • StopCache
    • CacheStoppedCallback
    • CacheStream
      • Properties
        • CanRead
        • CanSeek
        • CanWrite
        • Length
        • Position
      • Methods
        • Close
        • Flush
        • GetBufferedStream
        • Read
        • Seek
        • SetLength
        • Write
    • CacheStreamAttributes
      • Constructors
        • CacheStreamAttributes
      • Properties
        • CacheDependency
        • CacheItemPriority
        • Expiration
        • Group
        • StreamMode
    • CacheSyncDependency
      • Constructors
        • CacheSyncDependency
      • Properties
        • CacheId
        • Key
        • Password
        • Port
        • Server
        • UserId
      • Methods
        • Deserialize
        • Serialize
    • ClientCacheSyncMode
    • ContinuousQuery
      • Constructors
        • ContinuousQuery
      • Properties
        • Command
      • Methods
        • Equals
        • GetHashCode
        • RegisterClearNotification
        • RegisterNotification
        • UnRegisterClearNotification
        • UnRegisterNotification
    • ContinuousQueryClearCallback
    • CQEventArg
      • Properties
        • ContinuousQuery
    • Credentials
      • Constructors
        • Credentials
      • Properties
        • Password
        • UserID
    • EventArg
      • Properties
        • CacheName
        • EventType
        • Item
        • OldItem
    • EventCacheItem
      • Properties
        • CacheItemPriority
        • CacheItemVersion
        • EntryType
        • Group
        • ResyncOptions
      • Methods
        • Clone
        • GetValue
    • ICache
      • Properties
        • ClientInfo
        • ConnectedClientList
        • Count
        • DataTypeManager
        • ExecutionService
        • MessagingService
        • NotificationService
        • SearchService
      • Methods
        • Add
        • AddAsync
        • AddBulk
        • Clear
        • ClearClientCache
        • Contains
        • ContainsBulk
        • Get
        • GetBulk
        • GetCacheItem
        • GetCacheItemBulk
        • GetCacheStream
        • GetIfNewer
        • GetJsonEnumerator
        • Insert
        • InsertAsync
        • InsertBulk
        • Lock
        • Remove
        • RemoveAsync
        • RemoveBulk
        • Unlock
        • UpdateAttributes
    • ICacheReader
      • Properties
        • FieldCount
        • IsClosed
      • Methods
        • Close
        • GetBoolean
        • GetDateTime
        • GetDecimal
        • GetDouble
        • GetInt16
        • GetInt32
        • GetInt64
        • GetName
        • GetOrdinal
        • GetString
        • GetValue
        • GetValues
        • Read
    • IsolationLevel
    • LockHandle
      • Constructors
        • LockHandle
      • Properties
        • LockDate
        • LockId
    • LogLevel
    • MemberJoinedCallback
    • MemberLeftCallback
    • NodeInfo
      • Properties
        • IpAddress
        • Port
      • Methods
        • ToString
    • PaginatedQueryCommand
      • Constructors
        • PaginatedQueryCommand
      • Properties
        • PageSize
    • QueryCommand
      • Constructors
        • QueryCommand
      • Properties
        • Parameters
        • Query
    • QueryDataNotificationCallback
    • RemoteCacheKeyDependency
      • Constructors
        • RemoteCacheKeyDependency
      • Properties
        • HasChanged
        • RemoteCacheID
        • RemoteCacheKey
      • Methods
        • DependencyDispose
        • Initialize
    • ServerInfo
      • Constructors
        • ServerInfo
      • Properties
        • IP
        • IsLoadBalancer
        • Name
        • Port
        • Priority
      • Methods
        • CompareTo
        • Equals
        • ToString
    • StreamMode
    • TagSearchOptions
    • Alachisoft.NCache.Client.DataTypes
      • DataTypeAttributes
        • Constructors
          • DataTypeAttributes
        • Properties
          • Dependency
          • Expiration
          • Group
          • NamedTags
          • Priority
          • ResyncOptions
          • Tags
      • IDataTypeManager
        • Methods
          • CreateCounter
          • GetCounter
          • Remove
      • IDistributedDataTypes
        • Properties
          • Key
          • WriteThruOptions
    • Alachisoft.NCache.Client.DataTypes.Collections
      • ICollectionManager
        • Methods
          • CreateDictionary
          • CreateHashSet
          • CreateList
          • CreateQueue
          • GetDictionary
          • GetHashSet
          • GetList
          • GetQueue
      • IDistributedDictionary<TKey, TValue>
        • Methods
          • Get
          • Insert
          • Remove
      • IDistributedHashSet<T>
        • Methods
          • AddRange
          • Difference
          • GetRandom
          • Intersect
          • Remove
          • RemoveRandom
          • StoreDifference
          • StoreIntersection
          • StoreUnion
          • Union
      • IDistributedList<T>
        • Methods
          • AddRange
          • First
          • GetRange
          • InsertAfter
          • InsertAtHead
          • InsertAtTail
          • InsertBefore
          • Last
          • RemoveRange
          • Trim
      • IDistributedQueue<T>
        • Methods
          • Clear
          • Contains
          • CopyTo
          • Dequeue
          • DequeueBulk
          • Enqueue
          • EnqueueBulk
          • Peek
          • ToArray
      • ILockable
        • Methods
          • Lock
          • Unlock
      • INotifiable
        • Methods
          • RegisterNotification
          • UnRegisterNotification
    • Alachisoft.NCache.Client.DataTypes.Counter
      • ICounter
        • Properties
          • Value
        • Methods
          • Decrement
          • DecrementBy
          • Increment
          • IncrementBy
          • SetValue
    • Alachisoft.NCache.Client.Services
      • IExecutionService
        • Methods
          • Aggregate
          • ExecuteTask
          • GetRunningTasksIds
          • GetTaskResult
          • Invoke
      • IMessagingService
        • Methods
          • CreateTopic
          • DeleteTopic
          • DeleteTopicAsync
          • GetTopic
          • RegisterCacheNotification
          • RegisterCQ
          • UnRegisterCacheNotification
          • UnRegisterCQ
      • INotificationService
        • Events
          • CacheCleared
          • CacheClientConnectivityChanged
          • CacheStopped
          • MemberJoined
          • MemberLeft
      • ISearchService
        • Methods
          • ExecuteNonQuery
          • ExecuteReader
          • ExecuteScalar
          • GetByTag
          • GetByTags
          • GetGroupData
          • GetGroupKeys
          • GetKeysByTag
          • GetKeysByTags
          • RemoveByTag
          • RemoveByTags
          • RemoveGroupData
  • Alachisoft.NCache.Runtime
    • CacheItemPriority
    • NCacheConfigurationOptions
      • Properties
        • InstallDir
        • LogPath
    • Alachisoft.NCache.Runtime.Aggregation
      • IAggregator
        • Methods
          • Aggregate
          • AggregateAll
      • IValueExtractor
        • Methods
          • Extract
    • Alachisoft.NCache.Runtime.Bridge
      • BridgeItemOpCodes
      • BridgeItemVersion
      • ConflictResolution
        • Constructors
          • ConflictResolution
        • Properties
          • ResolutionAction
      • IBridgeConflictResolver
        • Methods
          • Dispose
          • Init
          • Resolve
      • ProviderBridgeItem
        • Constructors
          • ProviderBridgeItem
        • Properties
          • BridgeItemVersion
          • Key
          • OpCode
          • Value
      • ResolutionAction
    • Alachisoft.NCache.Runtime.CacheLoader
      • ICacheLoader
        • Methods
          • GetDatasetsToRefresh
          • Init
          • LoadDatasetOnStartup
          • RefreshDataset
      • RefreshPreference
    • Alachisoft.NCache.Runtime.Caching
      • CacheClientConnectivityChangedCallback
      • CacheItemAttributes
        • Properties
          • AbsoluteExpiration
          • Dependency
          • ResyncRequired
      • ConnectivityStatus
      • DataSourceModifiedCallBack
      • DeliveryMode
      • DeliveryOption
      • DistributedDataType
      • Expiration
        • Constructors
          • Expiration
        • Properties
          • ExpireAfter
          • Type
      • ExpirationType
      • IDurableTopicSubscription
        • Properties
          • SubscriptionName
          • SubscriptionPolicy
      • IMessage
        • Properties
          • CreationTime
          • ExpirationTime
          • MessageId
          • Payload
      • INamedTagTypeRetrieval
        • Methods
          • GetTypeInternal
      • ITopic
        • Properties
          • ExpirationTime
          • IsClosed
          • MessageCount
          • Name
          • OnTopicDeleted
          • Priority
          • SearchOptions
        • Methods
          • CreateDurableSubscription
          • CreateSubscription
          • Publish
          • PublishAsync
          • PublishBulk
        • Events
          • MessageDeliveryFailure
      • ITopicSubscription
        • Properties
          • Topic
        • Methods
          • UnSubscribe
        • Events
          • OnMessageRecieved
      • Message
        • Constructors
          • Message
        • Properties
          • CreationTime
          • ExpirationTime
          • MessageId
          • NoExpiration
          • Payload
      • MessageDeliveryFailureCallback
      • MessageEventArgs
        • Constructors
          • MessageEventArgs
        • Properties
          • DeliveryOption
          • Message
          • Topic
          • TopicName
      • MessageFailedEventArgs
        • Constructors
          • MessageFailedEventArgs
        • Properties
          • MessageFailureReason
      • MessageFailureReason
      • MessageReceivedCallback
      • NamedTagsDictionary
        • Constructors
          • NamedTagsDictionary
        • Properties
          • Count
        • Methods
          • Add
          • Contains
          • GetEnumerator
          • INamedTagTypeRetrieval.GetTypeInternal
          • Remove
      • NonQueryIndexedAttribute
        • Constructors
          • NonQueryIndexedAttribute
      • ProviderCacheItem
        • Constructors
          • ProviderCacheItem
        • Methods
          • GetValue
          • SetValue
      • ProviderDataTypeItem<TValue>
        • Constructors
          • ProviderDataTypeItem
        • Properties
          • Counter
          • Data
          • Type
        • Methods
          • GetDataAsJson
      • ProviderItemBase
        • Properties
          • BitSet
          • Dependency
          • Expiration
          • Group
          • IsJavaReadThrough
          • ItemPriority
          • NamedTags
          • ResyncOptions
          • SubGroup
          • Tags
      • QueryIndexableAttribute
        • Constructors
          • QueryIndexableAttribute
      • QueryIndexedAttribute
        • Constructors
          • QueryIndexedAttribute
      • ReadMode
      • ReadThruOptions
        • Constructors
          • ReadThruOptions
        • Properties
          • Mode
          • ProviderName
        • Methods
          • Deserialize
          • Serialize
      • ResyncOptions
        • Constructors
          • ResyncOptions
        • Properties
          • ProviderName
          • ResyncOnExpiration
      • SubscriptionPolicy
      • Tag
        • Constructors
          • Tag
        • Properties
          • TagName
        • Methods
          • Equals
          • GetHashCode
          • ToString
      • TopicDeletedCallback
      • TopicDeleteEventArgs
        • Constructors
          • TopicDeleteEventArgs
        • Properties
          • TopicName
      • WriteBehindOpResult
        • Properties
          • Exception
          • Status
      • WriteBehindOpStatus
      • WriteMode
      • WriteThruOptions
        • Constructors
          • WriteThruOptions
        • Properties
          • Mode
          • ProviderName
        • Methods
          • Deserialize
          • Serialize
          • SetDataSourceNotification
    • Alachisoft.NCache.Runtime.Caching.Messaging
      • TopicSearchOptions
    • Alachisoft.NCache.Runtime.CustomDependencyProviders
      • ICustomDependencyProvider
        • Methods
          • CreateDependency
          • Dispose
          • Init
    • Alachisoft.NCache.Runtime.DataPersistence
      • DatasetIdentifier
        • Properties
          • DatasetId
          • IsMetaDataDataset
      • IDataPersistenceProvider
        • Methods
          • ClearDataset
          • CreateStore
          • Destroy
          • DisposeDataset
          • GetDatasetItemsCount
          • GetDatasetReader
          • Initialize
          • LoadData
          • LoadDataset
          • RemoveData
          • RemoveSafeDeletedRows
          • StoreData
          • TestConnection
          • VerifyStore
      • IDataReader<TKey, TValue>
        • Properties
          • Current
        • Methods
          • MoveNext
          • Reset
      • PersistedDataType
      • StorageEntryInfo
        • Properties
          • Data
          • StoreOperationType
      • StoreOperationType
    • Alachisoft.NCache.Runtime.DatasourceProviders
      • DatastructureOperationType
      • DataTypeWriteOperation
        • Constructors
          • DataTypeWriteOperation
        • Properties
          • DataType
          • OperationType
          • ProviderItem
      • IReadThruProvider
        • Methods
          • Dispose
          • Init
          • LoadDataTypeFromSource
          • LoadFromSource
      • IWriteThruProvider
        • Methods
          • Dispose
          • Init
          • WriteToDataSource
      • OperationResult
        • Constructors
          • OperationResult
        • Properties
          • Error
          • Exception
          • Operation
          • OperationStatus
          • UpdateInCache
      • OperationResult.Status
      • WriteOperation
        • Constructors
          • WriteOperation
        • Properties
          • OperationType
          • ProviderItem
        • Methods
          • getRetryCount
      • WriteOperationBase
        • Fields
          • _retryCount
        • Properties
          • Key
          • RetryCount
      • WriteOperationType
    • Alachisoft.NCache.Runtime.Dependencies
      • AggregateCacheDependency
        • Constructors
          • AggregateCacheDependency
        • Methods
          • Add
      • BulkExtensibleDependency
        • Properties
          • HasChanged
        • Methods
          • EvaluateBulk
          • Expire
      • CacheDependency
        • Constructors
          • CacheDependency
        • Fields
          • DEPENDENCY_COUNT_OVERHEAD
          • DEPENDENCY_TYPE_OVERHEAD
          • sizeInBytes
        • Properties
          • Dependencies
        • Methods
          • AddDependencies
          • DependencyDispose
          • Dispose
      • CmdParamsType
      • CustomDependency
        • Constructors
          • CustomDependency
        • Properties
          • Parameters
          • ProviderName
      • DBCacheDependency
        • Properties
          • ConnectionString
          • PrimaryKey
          • Type
      • DBDependencyFactory
        • Methods
          • CreateOleDbCacheDependency
          • CreateSqlCacheDependency
      • DBDependencyType
      • ExtensibleDependency
        • Properties
          • HasChanged
        • Methods
          • Initialize
      • FileDependency
        • Constructors
          • FileDependency
        • Properties
          • FileNames
          • StartAfterTicks
        • KeyDependency
          • Constructors
            • KeyDependency
          • Properties
            • CacheKeys
            • KeyDependencyType
            • StartAfterTicks
        • KeyDependencyType
        • NosDBDependency
          • Constructors
            • NosDBDependency
          • Properties
            • CommandText
            • ConnectionString
            • Parameters
            • Timeout
        • NotifyExtensibleDependency
          • Fields
            • DependencyChanged
          • Properties
            • HasChanged
        • NotifyExtensibleDependency.DependencyChangedHandler
        • OracleCacheDependency
          • Constructors
            • OracleCacheDependency
          • Properties
            • CommandParams
            • CommandText
            • CommandType
            • ConnectionString
        • OracleCmdParams
          • Properties
            • Direction
            • Type
            • Value
        • OracleCmdParamsType
        • OracleCommandType
        • OracleParameterDirection
        • SqlCacheDependency
          • Constructors
            • SqlCacheDependency
          • Properties
            • CommandParams
            • CommandText
            • CommandType
            • ConnectionString
        • SqlCmdParams
          • Properties
            • CompareInfo
            • Direction
            • IsNullable
            • LocaleID
            • Offset
            • Precision
            • Scale
            • Size
            • SourceColumn
            • SourceColumnNullMapping
            • SourceVersion
            • SqlCmpInfo
            • SqlParamDir
            • SqlParamType
            • SqlValue
            • SrcVersion
            • Type
            • TypeName
            • UdtTypeName
            • Value
        • SqlCommandType
        • SqlDataRowVersion
        • SqlParamDirection
      • Alachisoft.NCache.Runtime.Enum
        • JsonDataType
      • Alachisoft.NCache.Runtime.Events
        • DataTypeDataNotificationCallback
        • DataTypeEventArg
          • Constructors
            • DataTypeEventArg
          • Properties
            • CacheName
            • CollectionItem
            • CollectionType
            • EventType
            • OldCollectionItem
        • DataTypeEventDataFilter
        • EventDataFilter
        • EventType
      • Alachisoft.NCache.Runtime.Exceptions
        • AggregateException
          • Constructors
            • AggregateException
          • Properties
            • InnerExceptions
            • Message
        • APILoggingException
          • Constructors
            • APILoggingException
        • AttributeIndexNotDefined
          • Constructors
            • AttributeIndexNotDefined
        • BucketTransferredException
          • Constructors
            • BucketTransferredException
        • CacheException
          • Constructors
            • CacheException
          • Properties
            • ErrorCode
            • StackTrace
          • Methods
            • ToString
        • CollectionTypeMismatchException
          • Constructors
            • CollectionTypeMismatchException
          • Properties
            • IsTracable
          • Methods
            • GetObjectData
        • ConfigurationException
          • Constructors
            • ConfigurationException
        • ConnectionException
          • Constructors
            • ConnectionException
          • Properties
            • IPAddress
            • Port
        • GeneralFailureException
          • Constructors
            • GeneralFailureException
        • InvalidReaderException
          • Constructors
            • InvalidReaderException
        • InvalidTaskEnumeratorException
          • Constructors
            • InvalidTaskEnumeratorException
        • LicensingException
          • Constructors
            • LicensingException
        • LockingException
          • Constructors
            • LockingException
        • MaintenanceException
          • Constructors
            • MaintenanceException
          • Methods
            • GetObjectData
        • ManagementException
          • Constructors
            • ManagementException
        • MaxClientReachedException
          • Constructors
            • MaxClientReachedException
          • Properties
            • Message
            • StackTrace
        • MemberIsStoppedException
          • Constructors
            • MemberIsStoppedException
          • Methods
            • GetObjectData
        • MetricsException
          • Constructors
            • MetricsException
          • Methods
            • GetObjectData
        • ObjectNotInitializedException
          • Constructors
            • ObjectNotInitializedException
          • Methods
            • GetObjectData
        • OperationFailedException
          • Constructors
            • OperationFailedException
          • Properties
            • IsTracable
        • OperationNotSupportedException
          • Constructors
            • OperationNotSupportedException
        • ParserException
          • Constructors
            • ParserException
        • SecurityException
          • Constructors
            • SecurityException
        • StateTransferInProgressException
          • Constructors
            • StateTransferInProgressException
        • StreamAlreadyLockedException
          • Constructors
            • StreamAlreadyLockedException
        • StreamCloseException
          • Constructors
            • StreamCloseException
        • StreamException
          • Constructors
            • StreamException
        • StreamInvalidLockException
          • Constructors
            • StreamInvalidLockException
        • StreamNotFoundException
          • Constructors
            • StreamNotFoundException
        • SuspectedException
          • Constructors
            • SuspectedException
        • TimeoutException
          • Constructors
            • TimeoutException
        • TypeIndexNotDefined
          • Constructors
            • TypeIndexNotDefined
      • Alachisoft.NCache.Runtime.GenericTypesProvider
        • IGenericTypeProvider
          • Methods
            • CheckIfSerializable
            • GetGenericTypes
        • Alachisoft.NCache.Runtime.JSON
          • IJsonArray
            • Properties
              • Item
            • Methods
              • Add
              • Contains
              • Remove
          • IJSONDocument
            • Properties
              • Count
              • Item
              • Size
            • Methods
              • Add
              • Clear
              • Contains
              • Get
              • GetArray
              • GetAsDecimal
              • GetAsDouble
              • GetAsFloat
              • GetAsInt16
              • GetAsInt32
              • GetAsInt64
              • GetAsString
              • GetAttributeDataType
              • GetAttributes
              • GetBoolean
              • GetDateTime
              • GetDocument
              • GetString
              • Parse
              • Remove
              • TryGet
          • IJsonObject
            • Properties
              • Count
              • Item
            • Methods
              • AddAttribute
              • Clear
              • ContainsAttribute
              • GetAttributeNames
              • GetAttributeValue
              • RemoveAttribute
          • IJsonValue
            • Properties
              • DataType
              • Value
          • JsonArray
            • Constructors
              • JsonArray
            • Properties
              • Count
              • InMemorySize
              • Item
              • Size
              • Value
            • Methods
              • Add
              • Clear
              • Contains
              • CopyTo
              • Equals
              • GetEnumerator
              • Remove
              • ToString
          • JsonConstants
            • Fields
              • SerializedDateTimeCulture
              • SerializedDateTimeFormat
          • JsonNull
            • Constructors
              • JsonNull
            • Methods
              • Equals
              • ToString
          • JsonObject
            • Constructors
              • JsonObject
            • Properties
              • Count
              • InMemorySize
              • Item
              • Size
              • Type
              • Value
            • Methods
              • AddAttribute
              • Clear
              • ContainsAttribute
              • Equals
              • GetAttributeNames
              • GetAttributeValue
              • GetEnumerator
              • RemoveAttribute
              • ToString
          • JsonValue
            • Methods
              • Equals
              • GetHashCode
              • ToBoolean
              • ToByte
              • ToDateTime
              • ToDecimal
              • ToDouble
              • ToFloat
              • ToInt16
              • ToInt32
              • ToInt64
              • ToSByte
              • ToString
              • ToStringValue
              • ToUInt16
              • ToUInt32
              • ToUInt64
            • Operators
              • Explicit
              • Implicit
          • JsonValueBase
            • Constructors
              • JsonValueBase
            • Properties
              • DataType
              • InMemorySize
              • Size
              • Value
            • Methods
              • Parse
            • Operators
              • Implicit
          • PrimaryField
            • Constructors
              • PrimaryField
        • Alachisoft.NCache.Runtime.MapReduce
          • ICombiner
            • Methods
              • BeginCombine
              • Combine
              • FinishChunk
          • ICombinerFactory
            • Methods
              • Create
          • IKeyFilter
            • Methods
              • FilterKey
          • IMapper
            • Methods
              • Map
          • IOutputMap
            • Methods
              • Emit
          • IReducer
            • Methods
              • BeginReduce
              • FinishReduce
              • Reduce
          • IReducerFactory
            • Methods
              • Create
          • ITaskResult
            • Properties
              • TaskFailureReason
              • TaskStatus
            • Methods
              • GetEnumerator
          • ITrackableTask
            • Properties
              • TaskId
              • TaskStatus
            • Methods
              • CancelTask
              • GetResult
            • Events
              • OnMapReduceComplete
          • KeyValuePair
            • Constructors
              • KeyValuePair
            • Properties
              • Key
              • Value
          • MapReduceCallback
          • MapReduceTask
            • Constructors
              • MapReduceTask
            • Properties
              • Combiner
              • Mapper
              • Reducer
          • TaskCompletionStatus
          • TaskStatus
            • Constructors
              • TaskStatus
            • Properties
              • FailureReason
              • Progress
          • TaskStatus.Status
        • Alachisoft.NCache.Runtime.Messaging
          • TopicPriority
        • Alachisoft.NCache.Runtime.Processor
          • EntryProcessorException
            • Constructors
              • EntryProcessorException
          • IMutableEntry
            • Properties
              • Key
              • Value
            • Methods
              • Exists
              • Remove
              • UnWrap
        • Alachisoft.NCache.Runtime.Serialization
          • ICompactSerializable
            • Methods
              • Deserialize
              • Serialize
          • ICustomSerializable
            • Methods
              • DeserializeLocal
              • SerializeLocal
        • Alachisoft.NCache.Runtime.Serialization.IO
          • CompactReader
            • Properties
              • BaseStream
            • Methods
              • Read
              • ReadBoolean
              • ReadByte
              • ReadBytes
              • ReadChar
              • ReadChars
              • ReadDateTime
              • ReadDecimal
              • ReadDouble
              • ReadGuid
              • ReadInt16
              • ReadInt32
              • ReadInt64
              • ReadObject
              • ReadObjectAs
              • ReadSByte
              • ReadSingle
              • ReadString
              • ReadUInt16
              • ReadUInt32
              • ReadUInt64
              • SkipBoolean
              • SkipByte
              • SkipBytes
              • SkipChar
              • SkipChars
              • SkipDateTime
              • SkipDecimal
              • SkipDouble
              • SkipGuid
              • SkipInt16
              • SkipInt32
              • SkipInt64
              • SkipObject
              • SkipObjectAs
              • SkipSByte
              • SkipSingle
              • SkipString
              • SkipUInt16
              • SkipUInt32
              • SkipUInt64
          • CompactWriter
            • Properties
              • BaseStream
            • Methods
              • Write
              • WriteObject
              • WriteObjectAs
  • EntityFrameworkCore
    • Alachisoft.NCache.EntityFrameworkCore
      • Cache
        • Methods
          • Insert
          • Remove
          • RemoveByQueryIdentifier
      • CachingOptions
        • Constructors
          • CachingOptions
        • Properties
          • AbsoluteExpirationTime
          • CreateDbDependency
          • ExpirationType
          • IsSyncEnabled
          • Priority
          • QueryIdentifier
          • ReadThruProvider
          • SlidingExpirationTime
          • StoreAs
        • Methods
          • Clone
          • SetAbsoluteExpiration
          • SetResyncProviderName
          • SetSlidingExpiration
      • DbContextExtensions
        • Methods
          • GetCache
      • NCacheConfiguration
        • Properties
          • BulkInsertChunkSize
          • CacheId
          • DatabaseType
          • InitParams
          • IsConfigured
          • IsErrorEnabled
        • Methods
          • Configure
          • ConfigureLogger
          • IsLoggerEnabled
      • QueryCacheExtensions.
        • Methods
          • FromCache
          • FromCacheAsync
          • FromCacheOnly
          • FromCacheOnlyAsync
          • GetDependency
          • LoadIntoCache
          • LoadIntoCacheAsync
  • SignalR
    • Alachisoft.NCache.AspNet.SignalR
      • DependencyResolverExtensions
        • Methods
          • UseNCache
      • NCacheScaleoutConfiguration
        • Constructors
          • NCacheScaleoutConfiguration
        • Properties
          • EventKey
          • Password
          • UserID
    • Alachisoft.NCache.AspNetCore.SignalR
      • NCacheConfiguration
        • Properties
          • ApplicationID
          • CacheName
          • ConnectionOptions
          • EventKey
          • Password
          • UserID
      • NCacheDependencyInjectionExtensions
        • Methods
          • AddNCache
  • LINQ
    • Alachisoft.NCache.Linq
      • NCacheQuery<T>
        • Constructors
          • NCacheQuery
        • Properties
          • ElementType
          • Expression
          • Provider
        • Methods
          • GetEnumerator
          • IEnumerable.GetEnumerator
  • OutputCacheProvider
    • Alachisoft.NCache.OutputCacheProvider
      • NOutputCacheProvider
        • Properties
          • IsHookAttached
        • Methods
          • Add
          • Finalize
          • Get
          • Initialize
          • Remove
          • Set
    • Alachisoft.NCache.OutputCacheProvider.OutputCacheHook
      • CacheMetadata
        • Properties
          • Dependency
          • GroupName
          • NamedTag
          • TagList
      • CacheOperation
      • IOutputCacheHook
        • Methods
          • Dispose
          • Initialize
          • OnCachingOutput
  • Response Caching
    • Alachisoft.NCache.ResponseCaching
      • ResponseCachingExtensionMethods
        • Methods
          • AddNCacheResponseCachingServices
  • EntityFramework Caching
    • Alachisoft.NCache.Integrations.EntityFramework.Caching
      • CacheItemWrapper
        • Methods
          • SetCacheItem
      • CachingMethod
      • CachingOptions
        • Constructors
          • CachingOptions
        • Properties
          • AbsoluteExpirationTime
          • DbSyncDependency
          • ExpirationType
          • Priority
          • QueryIdentifier
          • SlidingExpirationTime
          • StoreAs
        • Methods
          • Clone
          • SetAbsoluteExpiration
          • SetSlidingExpiration
      • DependencyType
      • EFCommandInterceptor
        • Constructors
          • EFCommandInterceptor
        • Methods
          • Finalize
          • NonQueryExecuted
          • NonQueryExecuting
          • ReaderExecuted
          • ReaderExecuting
          • ScalarExecuted
          • ScalarExecuting
      • EFTransactionHandler
        • Constructors
          • EFTransactionHandler
        • Methods
          • Committed
          • Committing
          • ConnectionGetting
          • ConnectionGot
          • Disposed
          • Disposing
          • GetItem
          • IsolationLevelGetting
          • IsolationLevelGot
          • PutItem
          • RolledBack
          • RollingBack
      • EnumerableResult
        • Constructors
          • EnumerableResult
        • Methods
          • Add
          • GetEnumerator
          • Reset
      • ExpirationType
      • ICache
        • Properties
          • CacheId
        • Methods
          • GetItem
          • PutItem
      • NCache
        • Constructors
          • NCache
        • Properties
          • CacheId
        • Methods
          • Dispose
          • GetItem
          • InsertCacheItem
          • PutItem
      • NCacheQueryable<T>
        • Constructors
          • NCacheQueryable
        • Properties
          • ElementType
          • Expression
          • Provider
        • Methods
          • GetEnumerator
          • IEnumerable.GetEnumerator
      • QueryableExtensions
        • Methods
          • Cache
      • StoreAs
    • ResyncProviderModel
      • EfResyncProvider
        • Constructors
          • EfResyncProvider
        • Methods
          • GetDbConnetion
  • Sessions
    • Alachisoft.NCache.Caching.Distributed
      • IDistributedCacheProvider
        • Methods
          • GetDistributedCache
      • NCacheSessionExtensions
        • Methods
          • AddNCacheDistributedCache
          • AddNCacheDistributedCacheProvider
    • Alachisoft.NCache.Caching.Distributed.Configuration
      • NCacheConfiguration
        • Properties
          • AppName
          • BindIP
          • CacheName
          • ClientCacheSyncMode
          • ClientRequestTimeOut
          • CommandRetries
          • CommandRetryInterval
          • ConnectionRetries
          • ConnectionTimeout
          • DefaultReadThruProvider
          • DefaultWriteThruProvider
          • EnableDetailLogs
          • EnableKeepAlive
          • EnableLogs
          • ExceptionsEnabled
          • KeepAliveInterval
          • LoadBalance
          • Mode
          • PrimaryUserCredentials
          • RequestTimeout
          • RetryConnectionDelay
          • RetryInterval
          • ServerList
          • WriteExceptionsToEventLog
    • Alachisoft.NCache.Web.SessionState
      • NCacheSession
        • Properties
          • Id
          • IsAvailable
          • Keys
        • Methods
          • AbandonAsync
          • Clear
          • CommitAsync
          • LoadAsync
          • Remove
          • Set
          • TryGetValue
      • NCacheSessionExtensions
        • Methods
          • AddNCacheSession
          • Set
          • TryGetValue
          • UseNCacheSession
  • Data Protection Provider
    • NCacheDataProtectionBuilderExtension
      • Methods
        • PersistKeysToNCache

Method Get

Get<T>(String, ReadThruOptions)

Retrieves the specified item from the cache object, with read-through caching option available. If the option of read-through has been set, the object will be fetched from the data source if it does not exist in cache.

Declaration
T Get<T>(string key, ReadThruOptions readThruOptions = null)
Parameters
Type Name Description
System.String key

The unique identifier for the cache item to be retrieved.

ReadThruOptions readThruOptions

ReadThruOptions to read from data source. These can be either ReadThru, ReadThruForced or none.

Returns
Type Description
T

The retrieved cache item, or a null reference if the key is not found.

Type Parameters
Name Description
T

Specifies the type of value obtained from the cache.

Remarks

If the key does not exists in the cache, then a null value is returned.

Examples

The following example demonstrates how to retrieve the value from the cache.

ICache cache = CacheManager.GetCache("demoClusteredCache");

string key = "Product0";

ReadThruOptions readThruOptions = new ReadThruOptions(ReadMode.ReadThru);

Product product = cache.Get<Product>(key,readThruOptions);
Exceptions
Type Condition
System.ArgumentNullException

Key contains a null reference.

System.ArgumentException

Key is an empty string.

Get<T>(String, Boolean, TimeSpan, ref LockHandle)

Retrieves the specified object from the cache and locks it simulataneously, if it is not already locked. It returns null, if the object is already locked. This is different from the basic Get operation, where an object is returned ignoring the lock altogether. Use this method if you're using NCache item locking features.

Declaration
T Get<T>(string key, bool acquireLock, TimeSpan lockTimeout, ref LockHandle lockHandle)
Parameters
Type Name Description
System.String key

Unique identifier for the cache item to be retrieved.

System.Boolean acquireLock

A flag to determine whether to acquire a lock or not.

System.TimeSpan lockTimeout

The TimeSpan after which the lock is automatically released.

LockHandle lockHandle

An instance of LockHandle to hold the lock information.

Returns
Type Description
T

The retrieved cache item, or a null reference if the key is not found.

Type Parameters
Name Description
T

Specifies the type of value obtained from the cache.

Examples

The following example demonstrates how to retrieve the cached value and acquire a lock at the same time for minutes.

ICache cache = CacheManager.GetCache("demoCache");

Product product = new Product();
product.Id = 1;
product.Name = "Chai";

string key = "Product0";

cache.Add(key, product);

LockHandle lockHandle = new LockHandle();

object cachedItem = cache.Get<Product>(key, true, new TimeSpan(0, 2, 0), ref lockHandle);
Exceptions
Type Condition
System.ArgumentNullException

key contains a null reference.

System.ArgumentException

key is an empty string.

Get<T>(String, ref CacheItemVersion, ReadThruOptions)

Retrieves the specified item from the cache object, with read-through caching option available. If the option of read-through has been set, the object will be fetched from the data source if it does not exist in cache. It accepts the CacheItemVersion by reference.

If null is passed for CacheItemVersion, then the version of the object from the cache is returned. If non-null CacheItemVersion is passed, then object is returned from the cache only if that is the current version of the object in the cache.

Declaration
T Get<T>(string key, ref CacheItemVersion version, ReadThruOptions readThruOptions = null)
Parameters
Type Name Description
System.String key

Unique identifier for the cache item to be retrieved.

CacheItemVersion version

The version of the object.

ReadThruOptions readThruOptions

ReadThruOptions to read from data source. These can be either ReadThru, ReadThruForced or none.

Returns
Type Description
T

The retrieved cache item, or a null reference if the key is not found.

Type Parameters
Name Description
T

Specifies the type of value obtained from the cache.

Examples

The following example demonstrates how to retrieve the value cached with ReadThruOptions and version.

ICache cache = CacheManager.GetCache("demoCache");

Product product = new Product();
product.Id = 1;
product.Name = "Chai";

string key = "Product0";

CacheItemVersion version = cache.Add(key, product);

ReadThruOptions readThruOptions = new ReadThruOptions(ReadMode.ReadThru);

Product product = cache.Get<Product>(key,ref version, readThruOptions);
In This Article
  • Get<T>(String, ReadThruOptions)
  • Get<T>(String, Boolean, TimeSpan, ref LockHandle)
  • Get<T>(String, ref CacheItemVersion, ReadThruOptions)

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
� Copyright Alachisoft 2002 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top