package redis-async

  1. Overview
  2. Docs

Module type Redis.S_hashSource

Sourcemodule Key : sig ... end
Sourcemodule Value : sig ... end
Sourcetype t
Sourceval create : ?on_disconnect:(unit -> unit) -> where_to_connect:[< Async.Socket.Address.t ] Async.Tcp.Where_to_connect.t -> unit -> t Async.Deferred.Or_error.t
Sourceval close : t -> unit Async.Deferred.t

Redis commands are documented at: https://redis.io/commands

Sourceval select : t -> int -> unit Async.Deferred.Or_error.t
Sourceval flushall : t -> unit Async.Deferred.Or_error.t
Sourceval flushdb : t -> unit Async.Deferred.Or_error.t
Sourceval shutdown : t -> unit Async.Deferred.Or_error.t
Sourceval del : t -> Key.t list -> int Async.Deferred.Or_error.t
Sourceval exists : t -> Key.t list -> int Async.Deferred.Or_error.t
Sourceval keys : ?pattern:string -> t -> Key.t list Async.Deferred.Or_error.t
Sourceval scan : t -> cursor:int -> ?count:int -> unit -> ([ `Cursor of int ] * Key.t list) Async.Deferred.Or_error.t
Sourceval client_tracking : t -> ?bcast:bool -> unit -> [ `All | `Key of Key.t ] Async.Pipe.Reader.t Async.Deferred.Or_error.t

Turn on Redis client tracking and provide a pipe of invalidation messages received from the server. Closing the pipe turns tracking off.

The NOLOOP option is used, which means that subscribers will not see invalidation messages caused by themselves, unless it is from the flushdb / flushall command.

Read here for more on usage: https://redis.io/commands/client-tracking https://redis.io/topics/client-side-caching

  • parameter bcast

    Whether to use BCAST. Off by default.

Sourcemodule Field : sig ... end
Sourceval hset : t -> Key.t -> (Field.t * Value.t) list -> int Async.Deferred.Or_error.t
Sourceval hmget : t -> Key.t -> Field.t list -> Value.t option list Async.Deferred.Or_error.t
Sourceval hdel : t -> Key.t -> Field.t list -> int Async.Deferred.Or_error.t
Sourceval hscan : t -> cursor:int -> ?count:int -> Key.t -> ([ `Cursor of int ] * (Field.t * Value.t) list) Async.Deferred.Or_error.t
OCaml

Innovation. Community. Security.