## Index

### Functions

- expire
- get
- getString
- set

## Functions

### expire

- expire(key: string, ttl: number): Promise<boolean>

- - Defined in fly.d.ts:64

  Sets or overwrites a key's time to live (in seconds)

  #### Parameters

  - ##### key: string

    The key to modify

  - ##### ttl: number

    Expiration time remaining in seconds

  #### Returns Promise<boolean>

  true if ttl was set successfully

### get

- get(key: string): Promise<ArrayBuffer | null>

- - Defined in fly.d.ts:40

  Get an ArrayBuffer value (or null) from the cache. See `getString` if you want a string value.

  #### Parameters

  - ##### key: string

    The key to get

  #### Returns Promise<ArrayBuffer | null>

  Raw bytes stored for provided key or null if empty.

### getString

- getString(key: string): Promise<string | null>

- - Defined in fly.d.ts:47

  Get a string value (or null) from the cache

  #### Parameters

  - ##### key: string

    The key to get

  #### Returns Promise<string | null>

  Data stored at the key, or null if none exists

### set

- set(key: string, value: string | ArrayBuffer, ttl?: number): Promise<boolean>

- - Defined in fly.d.ts:56

  Sets a value at a certain key, with an optional ttl

  #### Parameters

  - ##### key: string

    The key to add or overwrite

  - ##### value: string | ArrayBuffer

    Data to store at the specified key, up to 2MB

  - ##### Optional ttl: number

  #### Returns Promise<boolean>

  true if the set was successful

Generated using TypeDoc