D
D
deleted-mezhevikin2014-11-30 18:44:56
Objective-C
deleted-mezhevikin, 2014-11-30 18:44:56

How to make a shared cache for webView and tableView?

There are two controllers:
1. A controller with a list of news. (UITableView)
2. Nosity controller (WebView)
In the first controller, I load pictures and show their previews.
For loading I use SDWebImage library.
In the second controller, you need to show the same image, but it is loaded again, since the webview and SDWebImage do not have a common cache.
Are there any hacks to solve this problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
deleted-mezhevikin, 2014-11-30
@deleted-mezhevikin

Solved the issue with https://github.com/rs/SDURLCache

K
Kirill, 2014-11-30
@kirill89

I haven't worked with SDWebImage for a long time, but it seemed to me that it caches already loaded images in memory by URL.
In any case, their documentation describes a mechanism that allows you to solve your problem: https://github.com/rs/SDWebImage#using-asynchronou...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question