« first day (2060 days earlier)      last day (598 days later) » 

6:39 AM
@TehShrike, is there example on how to implement the memcache ?
 
 
8 hours later…
2:21 PM
@jemz some sort-of-pseudo-code:
function getCustomerData(customerId, date) {
  const cacheKey = customerId + '-' + date
  const cachedData = memcache.get(cacheKey)

  if (cachedData) {
    return cachedData
  }

  const currentData = database.customerDataQuery(customerId, date)
  memcache.put(cacheKey, currentData)

  return currentData
}
memcache is its own setup, you'll have to install a memcache server and configure it like you would any other database connection.
You may also want to look at Redis, which is a very popular competitor.
 

« first day (2060 days earlier)      last day (598 days later) »