Comments (7)
Hi all, just to let you known that I'm working on it!
Commit: f985180
I think that a new release could be ready in a week or something.
from rss-parser.
Hi,
the cache expiration is decided by the date passed in the Builder and does not take into account the expiration date of the feed. But that can be a nice addition, I will think about that. Thanks for raising the topic.
from rss-parser.
The library doesn't support caching at parsing level. You have to implement it in your business logic.
from rss-parser.
The library doesn't support caching at parsing level. You have to implement it in your business logic.
Why. Is it something that can be implemented. For me, the OkHttp client I am passing to the Parser supports caching. It's not caching the requests though.
from rss-parser.
I'm going to explore this. Thank for the suggestion
from rss-parser.
Please explore ASAP.
The RSS I am trying to Cache is: http://news.google.com/news?q=covid-19&hl=en-US&sort=date&gl=us&num=20&output=rss
My OkHttpClient:
fun getOkHttpClient(context: Context): OkHttpClient {
val cacheSize = (5 * 1024 * 1024).toLong()
val myCache = Cache(context.cacheDir, cacheSize)
return OkHttpClient.Builder()
.cache(myCache)
.addInterceptor { chain ->
var request = chain.request()
request = if (isNetworkAvailable(context)!!)
request.newBuilder().header("Cache-Control", "public, max-age=" + 5).build()
else
request.newBuilder().header(
"Cache-Control",
"public, only-if-cached, max-stale=" + 60 * 60 * 24 * 7
).build()
chain.proceed(request)
}
.build()
}
from rss-parser.
Does the caching mechanism take into account the update interval set in the feed? It seems like the cache is a simple datetime-based cache where items just expire after certain time.
from rss-parser.
Related Issues (20)
- Resource leak HOT 1
- buzzsprout parse error HOT 3
- Unexplained 403 fetching some RSS feeds HOT 2
- Custom RSS Tag HOT 1
- how can i get the enclosure content? HOT 1
- Support additional RSS feeds from The Verge and Slashdot HOT 3
- Fatal Exception: com.prof18.rssparser.exception.HttpException HOT 5
- Get enclosing channel properties from an article HOT 1
- How to parse Youtube channel's feed HOT 1
- Always get exception RssParsingException HOT 3
- How to set timeout? HOT 1
- Is it possible to use this library with IOS with Swift (without Kotlin) HOT 1
- Dependency Dashboard
- is latest release 6.05 or 6.06 HOT 1
- Getting RssParsingException for https://inc42.com/buzz/feed/ HOT 1
- Please check if the XML is valid HOT 1
- What's the right way to use v6 in Java? HOT 3
- OkHttp 4 Compatibility HOT 5
- Use Ktor for the underlying HTTP request handler
- "FATAL EXCEPTION: main" Crash when open URL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rss-parser.