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

169
Views
Vue js: caché para acelerar la solicitud de API

Soy nuevo en Vue js y creé mi primer proyecto usando las API de Node JS y funciona bien, pero un poco lento cuando se logran múltiples solicitudes, así que creé un caché para cada API, pero como puedo ver, almacenó datos en caché por un corto período de tiempo. y luego necesito esperar nuevamente y cuando se almacena en caché no es muy rápido, a continuación creé una carpeta API.js y almacené todas mis llamadas API en ella ... ¿hay alguna manera de lograr las mejores prácticas de caché en Vue js? gracias de antemano

 import axios from 'axios' import { cacheAdapterEnhancer } from 'axios-extensions'; const http = axios.create({ baseURL: 'https://******.herokuapp.com/', headers: { 'Cache-Control': 'no-cache' }, // cache will be enabled by default adapter: cacheAdapterEnhancer(axios.defaults.adapter) }); class BuildingsService { getBuildings(){ return http.get('buildings/api/'); } getFlats(id){ return http.get(`flats/api/${id}`); } notifications(){ return http.get('notifications/api/'); } getOneBuilding(id){ return http.get(`buildings/api/${id}`) } getAllFlats(){ return http.get(flats/api/') } } export default new BuildingsService();

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