RxCache | Reactive caching library for Swift | Caching library

 by   FuckBoilerplate Swift Version: 1.0.2 License: MIT

kandi X-RAY | RxCache Summary

kandi X-RAY | RxCache Summary

RxCache is a Swift library typically used in Server, Caching, Ruby On Rails applications. RxCache has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

[Build Status] # RxCache. The goal of this library is simple: caching your data models like [SDWebImage] caches your images, with no effort at all. Every Swift 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 [Moya] api, RxCache is a reactive caching library for Swift which relies on [RxSwift] for turning your caching needs into an enum. Every enum value acts as a provider for RxCache, and all of them are managed through observables; they are the fundamental contract between the library and its clients. When supplying an observable which contains the data provided by an expensive task -probably a 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. So, when supplying an observable you get your observable cached back, and next time you will retrieve it without the time cost associated with its underlying task.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              RxCache has a low active ecosystem.
              It has 57 star(s) with 7 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 3 open issues and 5 have been closed. On average issues are closed in 9 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of RxCache is 1.0.2

            kandi-Quality Quality

              RxCache has 0 bugs and 0 code smells.

            kandi-Security Security

              RxCache has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              RxCache code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              RxCache is licensed under the MIT 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.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of RxCache
            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

            Classic API RxCache:,Enum providers example
            Swiftdot img1Lines of Code : 51dot img1License : Permissive (MIT)
            copy iconCopy
            enum CacheProviders : Provider {
                // Mock List
                case getMocks() // Mock List without evicting
                case getMocksEvictProvider(evictProvider : EvictProvider) // Mock List evicting
            
                // Mock List Filtering
                case getMocksFiltered(filter: Stri  

            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

            RxCache is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:.

            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 FuckBoilerplate

            base_app_ios

            by FuckBoilerplateSwift

            base_app_android

            by FuckBoilerplateJava