RxCache | Reactive caching library for Android and Java | Caching library

 by   VictorAlbertos Java Version: 1.6.5 License: Apache-2.0

kandi X-RAY | RxCache Summary

kandi X-RAY | RxCache Summary

RxCache is a Java library typically used in Server, Caching applications. RxCache has build file available, it has a Permissive License and it has medium support. However RxCache has 25 bugs and it has 2 vulnerabilities. You can download it from GitHub.

The goal of this library is simple: caching your data models like Picasso caches your images, with no effort at all. Every Android application is a client application, which means it does not make sense to create and maintain a database just for caching data. Plus, the fact that you have some sort of legendary database for persisting your data does not solves by itself the real challenge: to be able to configure your caching needs in a flexible and simple way. Inspired by Retrofit api, RxCache is a reactive caching library for Android and Java which turns your caching needs into an interface. When supplying an observable, single, maybe or flowable (these are the supported Reactive types) which contains the data provided by an expensive task -probably an http connection, RxCache determines if it is needed to subscribe to it or instead fetch the data previously cached. This decision is made based on the providers configuration.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              RxCache has a medium active ecosystem.
              It has 2402 star(s) with 197 fork(s). There are 63 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 15 open issues and 94 have been closed. On average issues are closed in 12 days. There are 6 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of RxCache is 1.6.5

            kandi-Quality Quality

              OutlinedDot
              RxCache has 25 bugs (5 blocker, 0 critical, 5 major, 15 minor) and 459 code smells.

            kandi-Security Security

              RxCache has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              OutlinedDot
              RxCache code analysis shows 2 unresolved vulnerabilities (2 blocker, 0 critical, 0 major, 0 minor).
              There are 15 security hotspots that need review.

            kandi-License License

              RxCache is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              RxCache releases are available to install and integrate.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              RxCache saves you 3381 person hours of effort in developing the same functionality from scratch.
              It has 7250 lines of code, 781 functions and 112 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed RxCache and discovered the below as its top functions. This is intended to give you an instant insight into RxCache implemented functionality, and help decide if they suit your requirements.
            • Clones this map
            • Changes the size of the data structure
            • Put a key - value mapping into this map
            • Adds a new key - value pair
            • Invokes the method
            • Gets observable
            • Gets the object from an array parameter
            • Retrieves a record from disk
            • Decrypts a file
            • Returns true if the map contains the specified key
            • Start the migrations
            • Initialize this class
            • Retrieves an Array from the cache
            • Retrieves a previously saved collection
            • Retrieve a map
            • Retrieves all the keys from all files in the cache directory
            • Retrieves the migrations for the specified providers
            • Returns the value mapped to the specified key
            • Obtain the eviction task
            • Returns a string representation of this Map
            • Reads the map data from the given stream
            • Generate a list of providers
            • Compares this map with another map
            • Retrieve memory in megabytes
            • Retrieves the object from cache
            • Write the map data to the stream
            Get all kandi verified functions for this library.

            RxCache Key Features

            No Key Features are available at this moment for RxCache.

            RxCache Examples and Code Snippets

            No Code Snippets are available at this moment for RxCache.

            Community Discussions

            QUESTION

            RxCache - Prevent observable from getting evicted
            Asked 2017-Aug-25 at 00:36

            I'm using RxCache on my Android project and I have a problem when the user has no internet connection.

            Is there a way to prevent an observable from getting evicted if no data is returned from the server?

            For example, each time the user refreshes a news feed (pull to refresh) getRepository().getFeedPosts(tag, new EvictProvider(true)); gets called.

            If the user suddently loses his connection to the internet and refreshes the feed again, no data gets returned from the server, the observable gets evicted and it returns the cached version (since I'm setting useExpiredDataIfLoaderNotAvailable(true) on the RxCache builder).

            Again with no internet connection, if the user refreshes a second time, no cached data is available.

            Is there a way to prevent that from happening?

            Thanks

            ...

            ANSWER

            Answered 2017-May-26 at 16:09

            Answering my own question, I guess it's a RxCache limitation.

            This is what Victor Albertos from RxCache told me:

            I don't think that's possible. Precisely, this is the way you evict the data of some provider, by creating an observable that just throws. I admit this is not optimal, but if you want to use a more mature API which handles these scenarios properly, I recommend to you to use ReactiveCache

            Source https://stackoverflow.com/questions/43939114

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install RxCache

            Add the JitPack repository in your build.gradle (top level module):.
            Finally, instantiate the Providers interface using RxCache.Builder and supplying a valid file system path which would allow RxCache to write on disk.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Caching Libraries

            caffeine

            by ben-manes

            groupcache

            by golang

            bigcache

            by allegro

            DiskLruCache

            by JakeWharton

            HanekeSwift

            by Haneke

            Try Top Libraries by VictorAlbertos

            BreadcrumbsView

            by VictorAlbertosJava

            RxActivityResult

            by VictorAlbertosJava

            RxSocialConnect-Android

            by VictorAlbertosJava

            SwipeCoordinator

            by VictorAlbertosJava

            ReactiveCache

            by VictorAlbertosJava