{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
0
Question by NAVAJEEVANA BATHULA · Jan 23, 2017 at 11:28 AM · 1.1k Views cachepopulate cachelookup

Store the data into cache and retrive data from cache

Hello,

I have created a cache in environment configurations. I have create no target proxy for this.By using populate cache policy I have store some data to the cache. I have lookupcache policy for retreiving the data from cache. I am getting 200 OK response but how can I know that whether the data is stroed in cache or not.

this what I have given for sample in populate cache policy.

This is lookup cache policy.


Could please guide me.

Thank you.

populate.jpg (43.4 kB)
lookup.jpg (37.6 kB)
Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

3 Answers

  • Sort: 
avatar image
0

Answer by Sachhida Das   · Jan 23, 2017 at 02:26 PM

@NAVAJEEVANA BATHULA: see the trace.. if it is coming from cache then will not call the backend.

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Omid Tahouri   · Jan 23, 2017 at 02:37 PM

The lookup policy will add flow variables after it is executed - see this page in the documentation for a list of all variables associated with this type of policy.

  • You can check the value of lookupcache.{policy-name}.cachehit to understand if the cache lookup returned a result.
  • If the cache population policy fails, a runtime fault will be thrown with details about the failure. Fault variables also capture the error and are available to use for conditions/error handling.

Does the <Source> variable you've specified (flowVar) exist with a value? If not, you won't be caching anything. It's worth noting that the lookup policy is configured to set the value it finds in cache to the variable specified in <AssignTo> (in your case, f1).

The <CacheKey> you are constructing in the two policies must be consistent, otherwise you will never experience a cache hit.

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Dinesh Kumar   · Jan 24, 2017 at 09:04 AM

Hi NAVAJEEVANA,

Are you getting data in "f1" flow variable or not. If not then it is not stored or your lookup is not configured properly.

Populate cache is for populating data in cache at run time and lookup is for retrieving data at run time. Ideally these two has to be used in different flows/operations. If you did it intentionally for testing purpose then fine.

If "f1" flow variable is not having any data then i see an issue while doing lookup that you are not passing one key fragment value "Cache".

For debug purpose you can do trace on and hit this API from postman for soapui. Better you set the "f1" variable data in your response to verify it.

Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image NAVAJEEVANA BATHULA · Jan 24, 2017 at 11:18 AM 0
Link

Thank you @Dinesh Kumar for your response. I am not getting data in "f1" flow variable and working on it.

Follow this Question

Answers Answers and Comments

48 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

LookupCache is working weirdly, i.e it's retrieving cache sometimes and other times it's empty 1 Answer

Cache transaction details instead of the application session 3 Answers

Deprecated [TimeoutInSec] in expiry settings in Populate Cache policy 1 Answer

can I set value to cachehit for the lookupcache 1 Answer

Caching Policy in not getting executed in the sequence it is provided inside defaultFaultHandling_sharedFlow 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Articles
  • Ideas
  • Badges