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

165
Visualizações
validate partial part of getStaticProps (cache)

So, while working on a project where having a file post.js

In which we have getStaticProps which does 2 things:

1. Validate the user if user is 
not valid redirect to login page

2. Fetch the post related data from external API endpoint

I am new to this, I've heard about revalidate option in getStaticProps to cache the response, i need the same thing to cache post details but I need to also verify that user is valid or not

Can I do something that only caches the post details but check validity of user every time?

Thanks, I'm going too frustrated to this situation, please help how to approach this problem!!!

about 4 years ago · Juan Pablo Isaza
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