-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authentication requests are always executed #149
Comments
Hello, I also would like to have recommendation for this. By my side, I decorated each API class that I wanted to cache (FamilyApi, AttributeApi...) and overrided the AkeneoPimClientBuilder class to use them. It is a little dirty but this works form me and you can have differents caching strategies by API. |
Hello and sorry for the late reply, In order to better understand it:
|
None of the questions are related to this issue, sorry. The This means that if the instance of |
Hello, I better understand your problem. Your authentication response is returned from the cache itself, which will not work. I will talk with my teammates and keep you in touch about this problem. |
Any updates on this? This is still a major performance bottleneck... |
Hello, I understand you issue, but I'm wondering how a single authentication request leads to performance bottleneck? In which context do you use the HTTP client? CLI or HTTP request? Can't you set up a token this way: https://api.akeneo.com/php-client/authentication.html#example? |
How does it matter how long that request takes? It's a completely useless request if I already have the data in cache. |
Hey everybody,
We're using the library to request data using Guzzle.
The issue we're having is that the Akeneo SDK is always executing authentication requests even though a request is actually already in the cache.
Here's what we're using:
So in other words, because Akeneo does not send any http caching headers we do use the
GreedyCacheStrategy
to force greedy caching. We then set this client using thesetHttpClient()
method. However, the->buildAuthenticatedByPassword()
wraps this client and always executes an authentication request even though the inner client actually has a middleware that knows the response already from the cache. Thus we're executing a number of nonsense authentication requests all the time.Is there any recommendation on how to implement caching on the SDK itself?
The text was updated successfully, but these errors were encountered: