GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SDWebImage/SDWebImagePINPlugin: A SDWebImage plugin to integrate PINCache for custom image caching

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
.swiftpm/xcode/package.xcworkspace
.swiftpm/xcode/package.xcworkspace
 
 
Example
Example
 
 
SDWebImagePINPlugin.xcodeproj
SDWebImagePINPlugin.xcodeproj
 
 
SDWebImagePINPlugin
SDWebImagePINPlugin
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
Cartfile
Cartfile
 
 
Cartfile.resolved
Cartfile.resolved
 
 
LICENSE
LICENSE
 
 
Package.resolved
Package.resolved
 
 
Package.swift
Package.swift
 
 
README.md
README.md
 
 
SDWebImagePINPlugin.podspec
SDWebImagePINPlugin.podspec
 
 

Repository files navigation

SDWebImagePINPlugin

CI Status Version License Platform Carthage compatible SwiftPM compatible codecov

What's for

SDWebImagePINPlugin is a plugin for SDWebImage framework, which provide the image loading support for PINCache cache system.

You use PINCache instead of SDImageCache for image cache system, which may better memory cache performance (By taking advanced of LRU algorithm), and disk cache performance (By taking advanced of queue management and age/bytes LRU algorithm)

Usage

PINCache

To enable PINCache instead of SDImageCache, you can bind the cache for shared manager, or create a custom manager instead.

  • Objective-C
// Use `PINCache` for shared manager
SDWebImageManger.defaultImageCache = [PINCache cacheWithName:@"name"];
  • Swift
// Use `PINCache` for shared manager
SDWebImageManger.defaultImageCache = PINCache(name: "name")

You can also attach the custom cache for individual image requests via .imageCache context option.

  • Objective-C
// Use `PINCache` for single URL request
[imageView sd_setImageWithURL:url placeholderImage:nil options:0 context:@{SDWebImageContextImageCache: @(pinCache)} progress:nil completion:completion];
  • Swift
// Use `PINCache` for single URL request
imageView.sd_setImage(with: url, placeholderImage: nil, context: [.imageCache : pinCache], progress: nil, completion: completion);

PINDiskCache && PINMemoryCache

You can also use PINMemoryCache or PINDiskcache to customize memory cache / disk cache only. See Custom Cache wiki in SDWebImage.

  • Objective-C
// Use `PINMemoryCache` for shared `SDImageCache` memory cache implementation
SDImageCacheConfig.defaultCacheConfig.memoryCacheClass = PINMemoryCache.class;
// Use `PINDiskcache` for shared `SDImageCache` disk cache implementation
SDImageCacheConfig.defaultCacheConfig.diskCacheClass = PINDiskcache.class;
  • Swift
// Use `PINMemoryCache` for `SDImageCache` memory cache implementation
SDImageCacheConfig.default.memoryCacheClass = PINMemoryCache.self
// Use `PINDiskcache` for `SDImageCache` disk cache implementation
SDImageCacheConfig.default.diskCacheClass = PINDiskcache.self

Requirements

  • iOS 9+
  • tvOS 9+
  • macOS 10.11+
  • watchOS 2.0+
  • Xcode 11+

Installation

CocoaPods

SDWebImagePINPlugin is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SDWebImagePINPlugin'

Carthage

SDWebImagePINPlugin is available through Carthage.

github "SDWebImage/SDWebImagePINPlugin"

Swift Package Manager (Xcode 11+)

SDWebImagePINPlugin is available through Swift Package Manager.

let package = Package(
    dependencies: [
        .package(url: "https://github.com/SDWebImage/SDWebImagePINPlugin.git", from: "0.3.0")
    ]
)

Author

DreamPiggy, [email protected]

License

SDWebImagePINPlugin is available under the MIT license. See the LICENSE file for more info.

About

A SDWebImage plugin to integrate PINCache for custom image caching

Topics

carthagecocoapodsiosmacospincachesdwebimagetvoswatchos

Resources

Readme
MIT license
Activity
Custom properties

Stars

6 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.