Microsoft's Azure Architecture Center describes the pattern in three steps. The application tries to read the item from the cache. On a miss, it reads the item from the data store. It then adds the item to the cache and returns it. When the application changes data, it writes to the data store and then removes the cached item, so the next read loads the new value.
The order of that write matters. Update the database first, then delete the cache key. If you delete the key first, another request can miss in the gap, read the old row, and put the stale value back into the cache, where it stays until it expires. Even with the right order, a reader can briefly see old data between the write and the next load, so the pattern does not guarantee the cache and database agree.
Microsoft lists cases where cache-aside fits badly. If the whole data set is static and fits in the cache, load it at startup and do not expire it. If most requests miss anyway, checking the cache only adds work. Sensitive data should come from the source of truth, and session state on a web farm should not depend on one server's cache. Compare it with a read-through cache and write-through, and see the URL shortener guide for cache-aside in an interview design.