Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

185
Views
Is memcached necessary?

I've recently used memcached and faced a question. Why we can't just use a dictionary from language instead of Memcached (e.g. Set() or Map() in javascript). Because in fact, Memcached is just a dictionary for temporary data. It seems to me that we violate the single responsibility principle but I don't understand how to form a fully correct answer.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Using memcached or a language construct depends on what you are trying to solve and the context of your application.

If you can share memory using a language construct (like Set or Map) throughout the entire application and the amount of data to cache fits well within the limits of a single process, it's hard to justify the cost of doing a network call to fetch cache data + the overhead of maintaining a memcache server.

On the other hand, if you can't share memory throughout your entire application (e.g. imagine many servers / isolated processes), or the amount of data to cache is greater than what you'd like in a process, then using a cache server (like memcached) makes more sense.

These are not mutually exclusive, applications can leverage both (cache server + in-memory) to achieve multi-level cache. Check out this post about how Stack Overflow does it.

The only case where I can see an application's local cache violating the SRP, is if it stores data unrelated to the application and makes it available to others.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!