## Index

### Functions

- del
- expire
- get
- getString
- set

## Functions

### del

- del(key: string): Promise<boolean>

- - Defined in fly/cache.ts:92

  Deletes the value (if any) at the specified key

  #### Parameters

  - ##### key: string

    Key to delete

  #### Returns Promise<boolean>

  true if delete was successful

### expire

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

- - Defined in fly/cache.ts:75

  Add or overwrite a key's time to live

  #### Parameters

  - ##### key: string

    The key to modify

  - ##### ttl: number

    Expiration time remaining in seconds

  #### Returns Promise<boolean>

  true if ttl was successfully updated

### get

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

- - Defined in fly/cache.ts:15

  Get an ArrayBuffer value (or null) from the cache

  #### Parameters

  - ##### key: string

    The key to get

  #### Returns Promise<ArrayBuffer>

  Raw bytes stored for provided key or null if empty.

### getString

- getString(key: string): Promise<any>

- - Defined in fly/cache.ts:37

  Get a string value (or null) from the cache

  #### Parameters

  - ##### key: string

    The key to get

  #### Returns Promise<any>

  Data stored at the key, or null if none exists

### set

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

- - Defined in fly/cache.ts:54

  Sets a value at the specified 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

    Time to live (in seconds)

  #### Returns Promise<boolean>

  true if the set was successful

Generated using TypeDoc