You should have mentioned your
previous post as it contains a lot of information about your project.
Also, your project sounds a lot like homework. You need to
do your own homework, as well as mention the parameters of your assignment. There are lots of solutions that would make sense in the real world but may be constrained in your assignment. Mentioning them ahead of time will save us a lot of time and energy. For example, do you really want to locally cache images? It may be more trouble than it is worth because you have to identify when images have changed or been deleted on the server. Are you certain that storing images in the DB and downloading them will be a performance bottleneck?
You say you are "having problems" caching. Exactly what problems are you having? You need to
show you have made some effort at solving your own problems.