website logo
⌘K
πŸ–οΈIntroduction to hyper cloud
🍎Getting Started
😍What's New
Blueberry Migration Guide
πŸ’ͺWorkshops
Deno Workshops
NodeJS Workshops
⚑Quickstarts
NodeJS Quickstarts
πŸ”ŒAPI Reference (hyper cloud)
🍎Basics
⚑hyper connect
πŸ”‘JWT Auth
πŸ’ΎData API
🏎️Cache API
πŸ”ŽSearch API
πŸ—„οΈStorage API
πŸ€“Queue API
πŸ”“Sign In
⚑Applications
βš™οΈSettings
πŸ”‘App Keys
πŸ‘₯Teams
Switching Between Accounts
Application Services
Application Service Instances
Adding a Queue Service
Adding a Search Service
Subscriptions
πŸ€‘Upgrade
πŸ“•Terminology
Parameters
πŸ’³Billing
Payment and Pricing Terms
πŸ’ΌLegal
Terms of Service
Acceptable Use Policy
Privacy Policy
πŸ•ΆοΈHyper Vision
Docs powered byΒ archbeeΒ 
18min

Cache Value with Key

POST /{appname}/cache/{servicename}

This command creates a cached key, value pair in the named cache. You can also specify the time to live property on this request which will specify how long you wish the document to be in the cache.

Parameters

Path Parameters

  • appname - the name of your hyper cloud application.
    • servicename - the name of your hyper cloud service within the application.

Request Body

  • key - string
    • value requirements
      • must begin with lowercase letter (a-z)
      • must be lowercase letters (a-z)
      • digits (0-9)
      • any of these characters _ $ + -
  • value - object
  • ttl - string - optional - instructs cache on how long the key/pair should remain in the cache
    • _s - for seconds, eg 20s = 20 seconds
      • _m - for minutes eg 40m = 40 minutes
      • _h - for hours eg 8h = 8 hours
      • _d - for days eg 10d = 10 days

Request Payload Limit

When creating or updating the cache, the document size limit isΒ 10MB.

JSON
|

Examples

Don't forget!

Be sure to set your HYPER environment variable with the value of your hyper app's connection string.

Node.js
Curl
|

Responses

Status Code

Description

Example Response

201

Success

{"ok": true}

500

Error

{"ok": false, "msg": "..."}

409

Key Conflict

{"ok": false, "msg": "the key already exists"}

Need Help?

You can always reach out to our support team for any additional assistance on slack.

Updated 24 Mar 2022
Did this page help you?
Yes
No
UP NEXT
Get Cache Value by Key
Docs powered byΒ archbeeΒ 
TABLE OF CONTENTS
POST /{appname}/cache/{servicename}
Parameters
Path Parameters
Request Body
Request Payload Limit
Examples
Don't forget!
Responses
Need Help?