Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

141
Visualizações
Django cache loses keys

I have a Django installation that uses the FileSystem caches. The caching system is used by an array of different views. Putting in place various logs to log when a key is not found in the cache and hence regenerated, I've found out that often the keys are lost. I don't have any "cache delete" in place and all the keys are stored to last 24 hours, but in the logs they all appear to be regenerated once in a while.

Is there any hidden parameter like "don't store more than n keys" or "more than n megabytes of data" or something? I'm a bit lost because it just seems that the keys are lost and I don't know when and why.

Also, I originally chose as cache location "/tmp/django-cache", so I thought that maybe the tmp directory was being cleaned by Linux, but changing the location to a "safer" one in my home directory doesn't change the anomaly.

Also, the full cache directory is around 25Mb, so I don't think there is something cleaning it up because it's too big.

Any idea?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The maximum number of items allowed in the cache before old values are deleted for locmem, filesystem and database backends is 300. You can change it by setting OPTIONS > MAX_ENTRIES.

From the Django documentation:

MAX_ENTRIES: The maximum number of entries allowed in the cache before old values are deleted. This argument defaults to 300.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda