ALL
Our Go Cache Library Choices
In Build a Go KV Cache from Scratch in 20 minutes, I walked you through what matters when writing a local cache, and eventually implemented one, whose performance was beaten badly by that of the popular go-cache on Github though. However, the bright side is that we can learn a lot from those excellent Github Go cache products, studying their features, applicable scenarios, and implementations, and extracting what we need.In this article, I will mainly analyze and compare the four cache libraries of go-cache, bigcache, golang-lru, and groupcache, which are all...
1,977 0 CACHE GOLANG GO-CACHE BIGCACHE GOURPCACHE
Consistency between Redis Cache and SQL Database
Nowadays, Redis has become one of the most popular cache solution in the Internet industry. Although relational database systems (SQL) bring many awesome properties such as ACID, the performance of the database would degrade under high load in order to maintain these properties.In order to fix this problem, many companies & websites have decided to add a cache layer between the application layer (i.e., the backend code which handles the business logic) and the storage layer (i.e., the SQL database). This cache layer is usually implemented using an in-memory cache. This is because, as state...
Cache them if you can
“The fastest HTTP request is the one not made.â€I always smile when I hear a web performance speaker say this. I forget who said it first, but I’ve heard it numerous times at conferences and meetups over the past few years. It’s true! Caching is critical for making web pages faster. I’ve written extensively about caching:Call to improve browser caching(lack of) Caching for iPhone Home Screen AppsRedirect caching deep diveMobile cache file sizesImproving app cacheStorager case study: Bing, GoogleApp cache & localStorage surveyHTTP Archive: max-ageThings are g...
3,343 0 CACHE HTTP REQUEST WEBSIITE
Buffcacher
What should a ‘cache’ be? It means a lot of things, but to my mind the default programming type should be:“keep around expensive-to-generate bits of read-only data in case we need them again, or until the computer really needs that RAM for something elseâ€I was writing a custom video editing program in Python (interesting choice of language for that problem) and I wanted to cache decoded frames; but I just wasn’t happy with the memory management of explicit caches. It means making a decision about how much RAM to ring-fence for something without having g...
2,612 0 BUFFER CACHE WEB BROWSER MEMORY RAM
How key-based cache expiration works
There are only two hard things in Computer Science: cache invalidation and naming things — Phil Karlton Doing cache invalidation by hand is an incredibly frustrating and error-prone process. You’re very likely to forget a spot and let stale data get served. That’s enough to turn most people off russian-doll caching structures, like the one we’re using for Basecamp Next. Thankfully there’s a better way. A much better way. It’s called key-based cache expiration and it works like this: The cache key is the fluid part and the cache content is the fixed ...
5,126 0 WORK CACHE EXPIRATION KEY-BASE CACHE
How to secure an Ubuntu Apache web server
Securing server software is not a straightforward task. Not all of our operating environments are the same, leading to a variety of potential security vulnerabilities. However, using a few basic configuration and security options, you can stay a little ahead of where you want to be.1. Fail2banFail2ban is a Python-based intrusion prevention software that detects and blocks malicious IP addresses from multiple unsuccessful attempts at software logins. In other words, if someone is attempting to login to your server via ssh, it detects multiple, unsuccessful attempts and blocks that user ip for a...
4,507 0 UNIX SERVER SECURITY LOG .HTACCESS CACHE