[TIMOB-6029] Android: Response cache doesn't request images after they are cleaned
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2012-03-11T22:26:00.000+0000 |
| Affected Version/s | Release 1.8.0 |
| Fix Version/s | n/a |
| Components | Android |
| Labels | n/a |
| Reporter | Marshall Culpepper |
| Assignee | Marshall Culpepper |
| Created | 2011-11-05T13:34:51.000+0000 |
| Updated | 2012-03-11T22:26:00.000+0000 |
Description
After the cleanup timer executes (around 1 minute), and cached images will be cleared out and subsequent image loads fail with exceptions.
I could not reproduce this in master. I had to remove the check for max_cache size, so it cleans the directory regardless of the cache size (TiResponseCache.java line 93). I ran the following app.js:
1. Launch the app 2. click on the button to open a new window. 3. Use DDMS to browse the cache directory /mnt/sdcard/Android/data/Titanium.UI.setBackgroundColor('#000'); var win1 = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); var button = Titanium.UI.createButton({ title:'open new window' }); var webview = Ti.UI.createImageView({ top: 0, left: 0, width: 100, height: 50, image: 'http://www.appcelerator.com/wp-content/themes/appcelerator/img/APPC_logo.png' }); var win2 = Titanium.UI.createWindow({ title:'Tab 2', backgroundColor:'#fff' }); win2.add(webview); button.addEventListener('click', function(){ win2.open(); }); var button2 = Titanium.UI.createButton({ title:'close window' }); button2.addEventListener('click', function(){ win2.close(); }); win2.add(button2); win1.add(button); win1.open();Closing this issue Tested with Allens test steps to reproduce and verified expected behavior *Note had to edit TiResponseCache.java to repro and scons