I recently wrote π a post on LinkedIn where I discussed the everyday conversation that I have in my office πΌ with the QA team,some engineers, and project managers.π€π
Here is my linkedIn Profile.
From that post π, I had an idea π‘ to create a blog about it so that they might grasp what developers π₯οΈ view as cache.
So let's get started with that:
A cache is a hardware or software component placed in the memory of an application or device that automatically and temporarily saves data consumed by the user in order to reduce the time and effort required to retrieve data the next time the programme or device is used.
Oh..., there are a lot of technical jargon π€―. Don't worry, let's explain this through the narrative of Prince Kim and Princess Rose. π€΄πΉβ¨
Prince Kim π€΄ from the kingdom of Utopia likes Princess Rose, whom he met at their kingdom's Party. He wanted to marry her after that, but she refused.
So Prince Kim assigned his best friend Jin to deliver his letters ππ to her.Every day, Jin goes to Rose's kingdom and transfers the letter ππ to her, receiving a reaction of 'NO' β and relaying this message to Prince Kim.
Jin must travel to Princess Rose's kingdom on a daily basis to receive her response, which is 'NO' β, as expected. So Jin discovers the pattern in which she consistently says 'NO' β. So rather than going to Rose's kingdom, which is extremely far away, he assumes from her prior response and says 'NO' β to prince.
That's what caches do. Jin acts as a cache, storing Rose's prior responses in his memory, reducing the need for effort to obtain a response from herπΉβ¨.
However, it is likely that she changed her mind in the span of time, but owing to the cache, the true reaction of Princess Rose was never revealed to Price Kim.
There are additional sorts of caches, however I will discuss the one that QA and developers typically encounter during testing or development:
- Browser Side Cache
- Server Side Cache
Browser Side Cache:
A browser cache is a temporary storage space on your computer or device that keeps copies of web pages and associated files (such as pictures, scripts, and stylesheets) that are frequently requested by web servers.
Why it's important:
This is significant since some files, graphics, and code never change, and it is costly to request the server even while the content remains constant. If it is not available, it will send unnecessary requests to the server, andΒ consuming resources.
Why it's problem at the same time :
I'll illustrate this with an example. For example, in some e-commerce websites, if the image of the product with the price is cached, and the price or image changes in the future, it may deduct more money and produce a different product than planned, causing an issue for that user even it is not.
To whom this happened :
- Those that use that website constantly without taking a break (usually testers do, hence they encounter this difficulty the most)
How to get rid of this:
- Always remove cache, cookie,localstorage,sessionstorage etc . before using.
- Pressing
Ctrl+f5
orCtrl + Shift + R
- Using Cache clear browser extension.
Server Side Cache:
Server-side caching is a strategy for improving the performance and efficiency of online applications that involves storing frequently requested data or computed results on the server. This lets the server to serve subsequent requests for the same data more rapidly by retrieving the cached information rather than recomputing or downloading it again.
Why it's important :
Server-side caching is essential for web applications because it increases speed by lowering response times and server load, resulting in a more scalable and responsive user experience.
Why it's problem at the same time :
It's not a problem as without that it's very difficult to provide fast results.
To whom this happened :
- To everyone (tester's , real user's etc.) because Server is serving cached response instead of updated response.
How to get rid of this:
We have the option of clearing the cache, and it varies depending on the server provider.
Thatβs all in this blog.π Cheers to the adventure that awaits and the stories yet to unfold! πβ¨
Top comments (6)
@jagroop2001 !!
you are just me.......
I have to have the above mentioned conversation with my QA team and after that it's automatically solved.
I don't know why they have to ask even they know it's cache issue. They didn't even think that previously it was cache issue then now it may be cache issue.
But still everyday we have to convey them that " IT'S CACHE ISSUE"
Start putting this mandatory line in your JIRA ticket or any other Project management tool you use :
"CLEAR CACHE BEFORE TESTING"
I had the following conversion once (not word for word).
QA: it does not work
Me: did you clear the caches?
QA: oh. No. Now it works, can we please remove caches for testing environments.
Me: Eh, maybe
QA: We need it
Me: Well then, okay
Days later...
QA: The system is too slow...
...
Soo true !!
But they have no other choice . They have to remove cache in order to test new feature.
@jagroop2001 !!
I completely understand what you write in the post.
Sometimes I feel, my co workers are too dumb or they just behave like that.
Everyone is smart!!
Some people specialise in appearing dumb while covertly acting brilliant.