![]() Risk: Memory exhaustion or thrashing on the desktop app.The actual impact of stale data varies widely based on the type of data, behavior of the data, and reason for updating the data. Similarly, reduced load on the server for retrieving large data sets that change infrequently. Benefit: Reduced network utilization between client and server.Benefit: Screens in the desktop application load faster.Here’s my attempt:ĭata is worth caching if it causes a visible increase in responsiveness to the end user without adding significant risks. These guidelines are not universal, but it’s worth having justification for what we are doing. This list is large - megabytes - but it is probably worth caching to save a few seconds here or there. We turn on new customers each month, but the list of customers isn’t continually changing throughout the day. In our application, we like to show a dropdown list or grid filled out with all the names of customers. In some cases, a collection of data is very large and unchanging. If we retrieve this data frequently, the average user will be quite annoyed at a 200-millisecond delay. Retrieving the data from the cloud may take 100 milliseconds for someone who is working close to the data center, but for our remote offices there is an extra 100 milliseconds delay simply due to the distance and routers in between them and the server. Because this is a three-tier business application, the actual permanent data resides on a database server in the data center or cloud. So let’s start off with why we are caching data. Let’s focus on why this particular app chose to cache data. There are a number of reasons to cache data, but this brief article isn’t a place to cover the entire theory of caching. Why am I caching data in the first place? I could continue listing things, but I think you already see where I am going. A big fat “Reset Cache” button on the app that didn’t actually reset all the caches due to some forgetful omissions in the code.Lots of spaghetti code that made it hard to tell what data was being cached, and when.Duplicative caches collecting the same data in slightly different ways.Inconsistent behavior in cached data - some caches would reset automatically over time, and others would not.Among the app’s caching problems were these three: So I woke up the other day to notice that I was managing a legacy business application, and it had some terrible caching problems. There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors. You may have heard some variation on this programming joke: One experience of the tradeoffs involved in caching useful data, and a solution that may be imperfect but is useful. I may d/l ICaching on my mac since that's what I always bring when traveling which is when I do most of my geocaching.Caching in a C# Line of Business Application Although the computer I use most frequently is a Macbook pro I have access to a windows machine at home on which I can run GSAK. I have tried running GSAK on a mac and it's a bit of a hassle. Not all Garmin GPS devices support GGZ and photos. But overall it works well and I think it's better than trying to get GSAK to work non-natively on a mac. There are still many features that I'd like to see added, such as filtering from locations other than your home location, filter by route, and the ability to select an area on the map. ![]() I also discovered recently that iCaching will install photos associated with geocaches to your Garmin device (I also discovered recently that Garmin handhelds support the association of photos with geocaches.) I used to just load pocket queries directly from the website, but GGZ has changed my outlook on loading and managing geocaches. The motivating factor was the addition of GGZ support. I finally broke down and paid for iCaching.
0 Comments
Leave a Reply. |