Check Key Existence Action Steps

  1. Action Definition
    • Open your project on the Kuika platform.
  • Click the Add Action button on the right side and select the Check Key Existence action.
  1. Cache Key Determination
  • Select the key you want to check. This key must have been added previously with Push To Cache.
  • Example: user_123_filters
  1. Using the Cache Provider
    • Must be the same as the cache provider where the key is located (InMemory, Redis, Mongo, or SQL).
  2. Running and Testing the Action
    • Run the action in Preview mode.
    • As output, you can verify whether the key is in the cache.
    • If you are using Redis, you can check the existence of the key via the terminal with redis-cli -h localhost -p 6379.

Important Points

  • The Check Key Existence action is only valid for keys added with Push To Cache or already existing in the cache.
  • When InMemory is selected, the key will be lost because the values will be deleted when the application is closed.
  • If the key is not found, the action may return false or an error; it is important to add conditions accordingly in subsequent actions.