How to prevent Browser cache on Angular 2 site?

angular-cli resolves this by providing an –output-hashing flag for the build command (versions 6/7, for later versions see here). Example usage: ng build –output-hashing=all Bundling & Tree-Shaking provides some details and context. Running ng help build, documents the flag: –output-hashing=none|all|media|bundles (String) Define the output filename cache-busting hashing mode. aliases: -oh <value>, –outputHashing <value> Although this … Read more

How does Linux perf calculate the cache-references and cache-misses events

The built-in perf events that you are interested in are mapping to the following hardware performance monitoring events on your processor: 523,288,816 cache-references (architectural event: LLC Reference) 205,331,370 cache-misses (architectural event: LLC Misses) 237,794,728 L1-dcache-load-misses L1D.REPLACEMENT 3,495,080,007 L1-dcache-loads MEM_INST_RETIRED.ALL_LOADS 2,039,344,725 L1-dcache-stores MEM_INST_RETIRED.ALL_STORES 531,452,853 L1-icache-load-misses ICACHE_64B.IFTAG_MISS 77,062,627 LLC-loads OFFCORE_RESPONSE (MSR bits 0, 16, 30-37) 27,462,249 LLC-load-misses … Read more

Caching Data in Web API

The solution I ended up using involved MemoryCache in the System.Runtime.Caching namespace. Here is the code that ended up working for caching my collection: //If the data exists in cache, pull it from there, otherwise make a call to database to get the data ObjectCache cache = MemoryCache.Default; var peopleData = cache.Get(“PeopleData”) as List<People>; if … Read more