Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

187
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda