Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
const TTLExpired time.Duration = 0
    Variables ¶
      View Source
      
  
var ( //ErrInvalidConnection will come out if you try to use an invalid connection in a session. ErrInvalidConnection = fmt.Errorf("cannot use an invalid connection") // ErrNotFound will come out if a key is not found in the cache. ErrNotFound = fmt.Errorf("the value tried to get has not been found, check if it may be expired") // ErrGetRequiresObjectReference will come out if a nil object // reference is passed in a Get operation. ErrGetRequiresObjectReference = fmt.Errorf("in Get operations it is mandatory to provide a non-nil object reference to store the result in, nil found") // ErrInTransactionObjectReferencesLengthMismatch will come out // if there is a mismatch in number of commands in the transaction // and the length of the object references array. ErrInTransactionObjectReferencesLengthMismatch = fmt.Errorf("in InTransactions you must provide an array of reference objects with length equal to the number of commands you call in the transaction") // ErrInTransactionMarshalValue will come out if a nil object value is parsed // from the cache transaction and at the same index of reference objects you // are expecting to put a value. ErrInTransactionMarshalValue = fmt.Errorf("in InTransaction you must provide an array that matches nil return values from cache into your reference objects array") // ErrNoNestedTransactions will come out if you try to call session.Intransaction inside // a transactionFunc. ErrNoNestedTransactions = fmt.Errorf("you cannot nest multiple InTransaction calls") // ErrInvalidTTL will come out if you try to set a zero-or-negative // TTL in a Set operation. ErrInvalidTTL = fmt.Errorf("cannot provide a negative TTL to Set operations") )
Functions ¶
This section is empty.
Types ¶
type CacheAdapter ¶
type CacheAdapter interface {
	// OpenSession opens a new Cache Session.
	OpenSession() (CacheSessionAdapter, error)
	// contains filtered or unexported methods
}
    CacheAdapter represents a Cache Mechanism abstraction.
type CacheSessionAdapter ¶
type CacheSessionAdapter interface {
	// Close closes the Cache Session.
	Close() error
	// contains filtered or unexported methods
}
    CacheSessionAdapter represents a Cache Session Mechanism abstraction.
type InTransactionFunc ¶ added in v0.0.4
type InTransactionFunc func(adapter CacheSessionAdapter) error
InTransactionFunc is a function executed inside an InTransaction calls of CacheAdapter and CacheSessionAdapter objects.
 Click to show internal directories. 
   Click to hide internal directories. 
