caching

RxJava and Cached Data

大城市里の小女人 提交于 2019-12-29 10:38:02
问题 I'm still fairly new to RxJava and I'm using it in an Android application. I've read a metric ton on the subject but still feel like I'm missing something. I have the following scenario: I have data stored in the system which is accessed via various service connections (AIDL) and I need to retrieve data from this system (1-n number of async calls can happen). Rx has helped me a ton in simplifying this code. However, this entire process tends to take a few seconds (upwards of 5 seconds+)

RxJava and Cached Data

梦想的初衷 提交于 2019-12-29 10:37:40
问题 I'm still fairly new to RxJava and I'm using it in an Android application. I've read a metric ton on the subject but still feel like I'm missing something. I have the following scenario: I have data stored in the system which is accessed via various service connections (AIDL) and I need to retrieve data from this system (1-n number of async calls can happen). Rx has helped me a ton in simplifying this code. However, this entire process tends to take a few seconds (upwards of 5 seconds+)

Basic Ajax Cache Issue

你说的曾经没有我的故事 提交于 2019-12-29 09:53:34
问题 I have a single page that I need to on occasion asynchronously check the server to see if the status of the page is current (basically, Live or Offline). You will see I have a function with a var live that is set when the page initially loads. I then do an ajax request to the server to retrieve whether the status of live is true or false. I compare the initial live variable with the newly returned data json object. If they're the same I do nothing, but if there different I apply some css

How check if a DiskLruCache already exists? (Android)

限于喜欢 提交于 2019-12-29 09:35:11
问题 I´m using that way of cache Bitmaps in my app Using DiskLruCache in android 4.0 does not provide for openCache method Thing is that I´m using that line in onCreate() DiskLruImageCache dlic=new DiskLruImageCache(getApplicationContext(),"bckgCache", CACHESIZE, CompressFormat.PNG, 70); and I´m pretty sure that It is overwriting my DiskLruCache everytime the app is opened "as new", so I´m not being able to recover some Bitmaps I catch las time user opened the app. So here is the question How can

How to save firestore requests by using Http cache-control?

☆樱花仙子☆ 提交于 2019-12-29 08:06:08
问题 Let's say i have a web/mobile app running firebase firestore database. My app is set to serve mostly dynamic content fully stored in firestore. So we are talking about caching dynamic content If a user load Page A, it's will make 1 request to firestore (for example). If this user go to Page B and then go back to Page A 5 minutes later, i don't want the app to make another request if the content has not changed. I heard about http cache-control headers but my concern is. If the cache control

Cache over 1mb memcache alternatives

余生颓废 提交于 2019-12-29 08:06:06
问题 I have an object in php that is more than one mb. I am using memcache which allows me to store 1mb or data. Does anyone know any other alternatives for data over 1mb. I have read that altering memcache to store more is not the best option. 回答1: You can use MultipartCache which extends memcache to support data higher than 1MB limit . Please note that in memcached 1.4.2 and higher you can configure the maximum supported object size by using the -I command-line option. memcached -I 5m //default:

What is the semantics for Super Queue and Line Fill buffers?

痴心易碎 提交于 2019-12-29 07:59:10
问题 I am asking this question regarding Haswell Microarchitetcure(Intel Xeon E5-2640-v3 CPU). From the specifications of the CPU and other resources I found out that there are 10 LFBs and Size of the super queue is 16. I have two questions related to LFBs and SuperQueues: 1) What will be the maximum degree of memory level parallelism the system can provide, 10 or 16(LFBs or SQ)? 2) According to some sources every L1D miss is recorded in SQ and then SQ assigns the Line fill buffer and at some

Django cache.set() causing duplicate key error

眉间皱痕 提交于 2019-12-29 07:58:08
问题 My Django site recently started throwing errors from my caching code and I can't figure out why... I call: from django.core.cache import cache cache.set('blogentry', some_value) And the error thrown by Django is: TransactionManagementError: This code isn't under transaction management But looking at the PostgreSQL database logs, it seems to stem from this error: STATEMENT: INSERT INTO cache_table (cache_key, value, expires) VALUES (E'blogentry', E'pickled_version_of_some_value', E'2009-07-27

When exactly do things get removed from urlcache's memory and disk?

核能气质少年 提交于 2019-12-29 07:52:25
问题 let memoryCapacity = 200 * 1024 * 1024 let diskCapacity = 1 * 1024 * 1024 let cache = URLCache(memoryCapacity: memoryCapacity, diskCapacity: diskCapacity, diskPath: "myDataPath") URLCache.shared = cache Scenario1 I'm setting urlcache's memory to 200mb and setting the disk space to 1mb. Then I download an image. Turn off internet and force quit the app, launch the app again by tapping it, and trigger a call (to download image) but it immediately crashes because data is nil Needless to say if I

EF Core 2.0.0 Query Filter is Caching TenantId (Updated for 2.0.1+)

我怕爱的太早我们不能终老 提交于 2019-12-29 07:01:50
问题 I'm building a multi-tenant application, and am running into difficulties with what I think is EF Core caching the tenant id across requests. The only thing that seems to help is constantly rebuilding the application as I sign in and out of tenants. I thought it may have something to do with the IHttpContextAccessor instance being a singleton, but it can't be scoped, and when I sign in and out without rebuilding I can see the tenant's name change at the top of the page, so it's not the issue.