{"id":28559054,"url":"https://github.com/sdwebimage/sdwebimagepinplugin","last_synced_at":"2025-06-10T08:36:03.117Z","repository":{"id":54416406,"uuid":"255035980","full_name":"SDWebImage/SDWebImagePINPlugin","owner":"SDWebImage","description":"A SDWebImage plugin to integrate PINCache for custom image caching","archived":false,"fork":false,"pushed_at":"2021-02-19T08:14:37.000Z","size":70,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T02:43:11.420Z","etag":null,"topics":["carthage","cocoapods","ios","macos","pincache","sdwebimage","tvos","watchos"],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SDWebImage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-12T08:01:54.000Z","updated_at":"2021-11-16T10:54:48.000Z","dependencies_parsed_at":"2022-08-13T15:00:46.501Z","dependency_job_id":null,"html_url":"https://github.com/SDWebImage/SDWebImagePINPlugin","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SDWebImage%2FSDWebImagePINPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SDWebImage%2FSDWebImagePINPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SDWebImage%2FSDWebImagePINPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SDWebImage%2FSDWebImagePINPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SDWebImage","download_url":"https://codeload.github.com/SDWebImage/SDWebImagePINPlugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SDWebImage%2FSDWebImagePINPlugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259039578,"owners_count":22796865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carthage","cocoapods","ios","macos","pincache","sdwebimage","tvos","watchos"],"created_at":"2025-06-10T08:36:00.600Z","updated_at":"2025-06-10T08:36:03.076Z","avatar_url":"https://github.com/SDWebImage.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SDWebImagePINPlugin\n\n[![CI Status](https://img.shields.io/travis/SDWebImage/SDWebImagePINPlugin.svg?style=flat)](https://travis-ci.org/SDWebImage/SDWebImagePINPlugin)\n[![Version](https://img.shields.io/cocoapods/v/SDWebImagePINPlugin.svg?style=flat)](https://cocoapods.org/pods/SDWebImagePINPlugin)\n[![License](https://img.shields.io/cocoapods/l/SDWebImagePINPlugin.svg?style=flat)](https://cocoapods.org/pods/SDWebImagePINPlugin)\n[![Platform](https://img.shields.io/cocoapods/p/SDWebImagePINPlugin.svg?style=flat)](https://cocoapods.org/pods/SDWebImagePINPlugin)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/SDWebImage/SDWebImagePINPlugin)\n[![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg?style=flat)](https://swift.org/package-manager/)\n[![codecov](https://codecov.io/gh/SDWebImage/SDWebImagePINPlugin/branch/master/graph/badge.svg)](https://codecov.io/gh/SDWebImage/SDWebImagePINPlugin)\n\n\n## What's for\nSDWebImagePINPlugin is a plugin for [SDWebImage](https://github.com/rs/SDWebImage/) framework, which provide the image loading support for [PINCache](https://github.com/pinterest/PINCache) cache system.\n\nYou 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)\n\n## Usage\n\n#### PINCache\nTo enable `PINCache` instead of `SDImageCache`, you can bind the cache for shared manager, or create a custom manager instead.\n\n+ Objective-C\n\n```objectivec\n// Use `PINCache` for shared manager\nSDWebImageManger.defaultImageCache = [PINCache cacheWithName:@\"name\"];\n```\n\n+ Swift\n\n```swift\n// Use `PINCache` for shared manager\nSDWebImageManger.defaultImageCache = PINCache(name: \"name\")\n```\n\nYou can also attach the custom cache for individual image requests via `.imageCache` context option.\n\n+ Objective-C\n\n```objectivec\n// Use `PINCache` for single URL request\n[imageView sd_setImageWithURL:url placeholderImage:nil options:0 context:@{SDWebImageContextImageCache: @(pinCache)} progress:nil completion:completion];\n```\n\n+ Swift\n\n```swift\n// Use `PINCache` for single URL request\nimageView.sd_setImage(with: url, placeholderImage: nil, context: [.imageCache : pinCache], progress: nil, completion: completion);\n```\n\n### PINDiskCache \u0026\u0026 PINMemoryCache\n\nYou can also use `PINMemoryCache` or `PINDiskcache` to customize memory cache / disk cache only. See [Custom Cache](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-cache-50) wiki in SDWebImage.\n\n+ Objective-C\n\n```objectivec\n// Use `PINMemoryCache` for shared `SDImageCache` memory cache implementation\nSDImageCacheConfig.defaultCacheConfig.memoryCacheClass = PINMemoryCache.class;\n// Use `PINDiskcache` for shared `SDImageCache` disk cache implementation\nSDImageCacheConfig.defaultCacheConfig.diskCacheClass = PINDiskcache.class;\n```\n\n+ Swift\n\n```swift\n// Use `PINMemoryCache` for `SDImageCache` memory cache implementation\nSDImageCacheConfig.default.memoryCacheClass = PINMemoryCache.self\n// Use `PINDiskcache` for `SDImageCache` disk cache implementation\nSDImageCacheConfig.default.diskCacheClass = PINDiskcache.self\n```\n\n## Requirements\n\n+ iOS 9+\n+ tvOS 9+\n+ macOS 10.11+\n+ watchOS 2.0+\n+ Xcode 11+\n\n## Installation\n\n#### CocoaPods\n\nSDWebImagePINPlugin is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'SDWebImagePINPlugin'\n```\n\n#### Carthage\n\nSDWebImagePINPlugin is available through [Carthage](https://github.com/Carthage/Carthage).\n\n```\ngithub \"SDWebImage/SDWebImagePINPlugin\"\n```\n\n#### Swift Package Manager (Xcode 11+)\n\nSDWebImagePINPlugin is available through [Swift Package Manager](https://swift.org/package-manager).\n\n```swift\nlet package = Package(\n    dependencies: [\n        .package(url: \"https://github.com/SDWebImage/SDWebImagePINPlugin.git\", from: \"0.3.0\")\n    ]\n)\n```\n\n## Author\n\nDreamPiggy, lizhuoli1126@126.com\n\n## License\n\nSDWebImagePINPlugin is available under the MIT license. See the LICENSE file for more info.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdwebimage%2Fsdwebimagepinplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdwebimage%2Fsdwebimagepinplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdwebimage%2Fsdwebimagepinplugin/lists"}