A simple implementation of remote/local resource cache
What's New
Initial Release
2022-10-23T10:52:40Z
- enable to cache using LRU
- retrieve resource from remote URL
- retrieve resource from local URL
Description
- Swift Tools 5.5.0
Description
{
"name": "SimpleCache",
"path": "/usr/src/package",
"targets": [
{
"name": "SimpleCacheTests",
"path": "Tests/SimpleCacheTests",
"type": "test",
"c99name": "SimpleCacheTests",
"sources": [
"SimpleCacheTests.swift"
],
"module_type": "SwiftTarget",
"target_dependencies": [
"SimpleCache"
]
},
{
"name": "SimpleCache",
"path": "Sources/SimpleCache",
"type": "library",
"c99name": "SimpleCache",
"sources": [
"LRUCache.swift",
"SimpleCache.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"SimpleCache"
],
"product_dependencies": [
"AsyncHTTPClient"
]
}
],
"products": [
{
"name": "SimpleCache",
"type": {
"library": [
"automatic"
]
},
"targets": [
"SimpleCache"
]
}
],
"platforms": [],
"dependencies": [
{
"url": "https://github.com/swift-server/async-http-client.git",
"type": "sourceControl",
"identity": "async-http-client",
"requirement": {
"range": [
{
"lower_bound": "1.12.0",
"upper_bound": "2.0.0"
}
]
}
}
],
"tools_version": "5.5",
"manifest_display_name": "SimpleCache"
}
Package Dump
{
"name": "SimpleCache",
"traits": [],
"targets": [
{
"name": "SimpleCache",
"type": "regular",
"exclude": [],
"settings": [],
"resources": [],
"dependencies": [
{
"product": [
"AsyncHTTPClient",
"async-http-client",
null,
null
]
}
],
"packageAccess": false
},
{
"name": "SimpleCacheTests",
"type": "test",
"exclude": [],
"settings": [],
"resources": [],
"dependencies": [
{
"byName": [
"SimpleCache",
null
]
}
],
"packageAccess": false
}
],
"products": [
{
"name": "SimpleCache",
"type": {
"library": [
"automatic"
]
},
"targets": [
"SimpleCache"
]
}
],
"pkgConfig": null,
"platforms": [],
"providers": null,
"packageKind": {
"root": [
"/usr/src/package"
]
},
"dependencies": [
{
"sourceControl": [
{
"traits": [
{
"name": "default"
}
],
"identity": "async-http-client",
"location": {
"remote": [
{
"urlString": "https://github.com/swift-server/async-http-client.git"
}
]
},
"requirement": {
"range": [
{
"lowerBound": "1.12.0",
"upperBound": "2.0.0"
}
]
},
"productFilter": null
}
]
}
],
"toolsVersion": {
"_version": "5.5.0"
},
"cLanguageStandard": null,
"cxxLanguageStandard": null,
"swiftLanguageVersions": null
}
Dependencies
- async-http-client1.26.0
Dependencies
{
"url": "/usr/src/package",
"name": "SimpleCache",
"path": "/usr/src/package",
"version": "unspecified",
"identity": "package",
"dependencies": [
{
"url": "https://github.com/swift-server/async-http-client.git",
"name": "async-http-client",
"path": "/usr/src/package/.build/checkouts/async-http-client",
"version": "1.26.0",
"identity": "async-http-client",
"dependencies": [
{
"url": "https://github.com/apple/swift-nio.git",
"name": "swift-nio",
"path": "/usr/src/package/.build/checkouts/swift-nio",
"version": "2.83.0",
"identity": "swift-nio",
"dependencies": [
{
"url": "https://github.com/apple/swift-atomics.git",
"name": "swift-atomics",
"path": "/usr/src/package/.build/checkouts/swift-atomics",
"version": "1.2.0",
"identity": "swift-atomics",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-collections.git",
"name": "swift-collections",
"path": "/usr/src/package/.build/checkouts/swift-collections",
"version": "1.2.0",
"identity": "swift-collections",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-system.git",
"name": "swift-system",
"path": "/usr/src/package/.build/checkouts/swift-system",
"version": "1.4.2",
"identity": "swift-system",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-nio-ssl.git",
"name": "swift-nio-ssl",
"path": "/usr/src/package/.build/checkouts/swift-nio-ssl",
"version": "2.31.0",
"identity": "swift-nio-ssl",
"dependencies": [
{
"url": "https://github.com/apple/swift-nio.git",
"name": "swift-nio",
"path": "/usr/src/package/.build/checkouts/swift-nio",
"version": "2.83.0",
"identity": "swift-nio",
"dependencies": [
{
"url": "https://github.com/apple/swift-atomics.git",
"name": "swift-atomics",
"path": "/usr/src/package/.build/checkouts/swift-atomics",
"version": "1.2.0",
"identity": "swift-atomics",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-collections.git",
"name": "swift-collections",
"path": "/usr/src/package/.build/checkouts/swift-collections",
"version": "1.2.0",
"identity": "swift-collections",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-system.git",
"name": "swift-system",
"path": "/usr/src/package/.build/checkouts/swift-system",
"version": "1.4.2",
"identity": "swift-system",
"dependencies": []
}
]
}
]
},
{
"url": "https://github.com/apple/swift-nio-http2.git",
"name": "swift-nio-http2",
"path": "/usr/src/package/.build/checkouts/swift-nio-http2",
"version": "1.36.0",
"identity": "swift-nio-http2",
"dependencies": [
{
"url": "https://github.com/apple/swift-nio.git",
"name": "swift-nio",
"path": "/usr/src/package/.build/checkouts/swift-nio",
"version": "2.83.0",
"identity": "swift-nio",
"dependencies": [
{
"url": "https://github.com/apple/swift-atomics.git",
"name": "swift-atomics",
"path": "/usr/src/package/.build/checkouts/swift-atomics",
"version": "1.2.0",
"identity": "swift-atomics",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-collections.git",
"name": "swift-collections",
"path": "/usr/src/package/.build/checkouts/swift-collections",
"version": "1.2.0",
"identity": "swift-collections",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-system.git",
"name": "swift-system",
"path": "/usr/src/package/.build/checkouts/swift-system",
"version": "1.4.2",
"identity": "swift-system",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-atomics.git",
"name": "swift-atomics",
"path": "/usr/src/package/.build/checkouts/swift-atomics",
"version": "1.2.0",
"identity": "swift-atomics",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-nio-extras.git",
"name": "swift-nio-extras",
"path": "/usr/src/package/.build/checkouts/swift-nio-extras",
"version": "1.27.1",
"identity": "swift-nio-extras",
"dependencies": [
{
"url": "https://github.com/apple/swift-nio.git",
"name": "swift-nio",
"path": "/usr/src/package/.build/checkouts/swift-nio",
"version": "2.83.0",
"identity": "swift-nio",
"dependencies": [
{
"url": "https://github.com/apple/swift-atomics.git",
"name": "swift-atomics",
"path": "/usr/src/package/.build/checkouts/swift-atomics",
"version": "1.2.0",
"identity": "swift-atomics",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-collections.git",
"name": "swift-collections",
"path": "/usr/src/package/.build/checkouts/swift-collections",
"version": "1.2.0",
"identity": "swift-collections",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-system.git",
"name": "swift-system",
"path": "/usr/src/package/.build/checkouts/swift-system",
"version": "1.4.2",
"identity": "swift-system",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-nio-http2.git",
"name": "swift-nio-http2",
"path": "/usr/src/package/.build/checkouts/swift-nio-http2",
"version": "1.36.0",
"identity": "swift-nio-http2",
"dependencies": [
{
"url": "https://github.com/apple/swift-nio.git",
"name": "swift-nio",
"path": "/usr/src/package/.build/checkouts/swift-nio",
"version": "2.83.0",
"identity": "swift-nio",
"dependencies": [
{
"url": "https://github.com/apple/swift-atomics.git",
"name": "swift-atomics",
"path": "/usr/src/package/.build/checkouts/swift-atomics",
"version": "1.2.0",
"identity": "swift-atomics",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-collections.git",
"name": "swift-collections",
"path": "/usr/src/package/.build/checkouts/swift-collections",
"version": "1.2.0",
"identity": "swift-collections",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-system.git",
"name": "swift-system",
"path": "/usr/src/package/.build/checkouts/swift-system",
"version": "1.4.2",
"identity": "swift-system",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-atomics.git",
"name": "swift-atomics",
"path": "/usr/src/package/.build/checkouts/swift-atomics",
"version": "1.2.0",
"identity": "swift-atomics",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-http-types.git",
"name": "swift-http-types",
"path": "/usr/src/package/.build/checkouts/swift-http-types",
"version": "1.4.0",
"identity": "swift-http-types",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-http-structured-headers.git",
"name": "swift-http-structured-headers",
"path": "/usr/src/package/.build/checkouts/swift-http-structured-headers",
"version": "1.3.0",
"identity": "swift-http-structured-headers",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-atomics.git",
"name": "swift-atomics",
"path": "/usr/src/package/.build/checkouts/swift-atomics",
"version": "1.2.0",
"identity": "swift-atomics",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-algorithms.git",
"name": "swift-algorithms",
"path": "/usr/src/package/.build/checkouts/swift-algorithms",
"version": "1.2.1",
"identity": "swift-algorithms",
"dependencies": [
{
"url": "https://github.com/apple/swift-numerics.git",
"name": "swift-numerics",
"path": "/usr/src/package/.build/checkouts/swift-numerics",
"version": "1.0.3",
"identity": "swift-numerics",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-certificates.git",
"name": "swift-certificates",
"path": "/usr/src/package/.build/checkouts/swift-certificates",
"version": "1.10.0",
"identity": "swift-certificates",
"dependencies": [
{
"url": "https://github.com/apple/swift-crypto.git",
"name": "swift-crypto",
"path": "/usr/src/package/.build/checkouts/swift-crypto",
"version": "3.12.3",
"identity": "swift-crypto",
"dependencies": [
{
"url": "https://github.com/apple/swift-asn1.git",
"name": "swift-asn1",
"path": "/usr/src/package/.build/checkouts/swift-asn1",
"version": "1.3.2",
"identity": "swift-asn1",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-asn1.git",
"name": "swift-asn1",
"path": "/usr/src/package/.build/checkouts/swift-asn1",
"version": "1.3.2",
"identity": "swift-asn1",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-nio-ssl.git",
"name": "swift-nio-ssl",
"path": "/usr/src/package/.build/checkouts/swift-nio-ssl",
"version": "2.31.0",
"identity": "swift-nio-ssl",
"dependencies": [
{
"url": "https://github.com/apple/swift-nio.git",
"name": "swift-nio",
"path": "/usr/src/package/.build/checkouts/swift-nio",
"version": "2.83.0",
"identity": "swift-nio",
"dependencies": [
{
"url": "https://github.com/apple/swift-atomics.git",
"name": "swift-atomics",
"path": "/usr/src/package/.build/checkouts/swift-atomics",
"version": "1.2.0",
"identity": "swift-atomics",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-collections.git",
"name": "swift-collections",
"path": "/usr/src/package/.build/checkouts/swift-collections",
"version": "1.2.0",
"identity": "swift-collections",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-system.git",
"name": "swift-system",
"path": "/usr/src/package/.build/checkouts/swift-system",
"version": "1.4.2",
"identity": "swift-system",
"dependencies": []
}
]
}
]
},
{
"url": "https://github.com/apple/swift-asn1.git",
"name": "swift-asn1",
"path": "/usr/src/package/.build/checkouts/swift-asn1",
"version": "1.3.2",
"identity": "swift-asn1",
"dependencies": []
},
{
"url": "https://github.com/swift-server/swift-service-lifecycle.git",
"name": "swift-service-lifecycle",
"path": "/usr/src/package/.build/checkouts/swift-service-lifecycle",
"version": "2.8.0",
"identity": "swift-service-lifecycle",
"dependencies": [
{
"url": "https://github.com/apple/swift-log.git",
"name": "swift-log",
"path": "/usr/src/package/.build/checkouts/swift-log",
"version": "1.6.3",
"identity": "swift-log",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-async-algorithms.git",
"name": "swift-async-algorithms",
"path": "/usr/src/package/.build/checkouts/swift-async-algorithms",
"version": "1.0.4",
"identity": "swift-async-algorithms",
"dependencies": [
{
"url": "https://github.com/apple/swift-collections.git",
"name": "swift-collections",
"path": "/usr/src/package/.build/checkouts/swift-collections",
"version": "1.2.0",
"identity": "swift-collections",
"dependencies": []
}
]
}
]
},
{
"url": "https://github.com/apple/swift-async-algorithms.git",
"name": "swift-async-algorithms",
"path": "/usr/src/package/.build/checkouts/swift-async-algorithms",
"version": "1.0.4",
"identity": "swift-async-algorithms",
"dependencies": [
{
"url": "https://github.com/apple/swift-collections.git",
"name": "swift-collections",
"path": "/usr/src/package/.build/checkouts/swift-collections",
"version": "1.2.0",
"identity": "swift-collections",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-log.git",
"name": "swift-log",
"path": "/usr/src/package/.build/checkouts/swift-log",
"version": "1.6.3",
"identity": "swift-log",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-nio-transport-services.git",
"name": "swift-nio-transport-services",
"path": "/usr/src/package/.build/checkouts/swift-nio-transport-services",
"version": "1.24.0",
"identity": "swift-nio-transport-services",
"dependencies": [
{
"url": "https://github.com/apple/swift-nio.git",
"name": "swift-nio",
"path": "/usr/src/package/.build/checkouts/swift-nio",
"version": "2.83.0",
"identity": "swift-nio",
"dependencies": [
{
"url": "https://github.com/apple/swift-atomics.git",
"name": "swift-atomics",
"path": "/usr/src/package/.build/checkouts/swift-atomics",
"version": "1.2.0",
"identity": "swift-atomics",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-collections.git",
"name": "swift-collections",
"path": "/usr/src/package/.build/checkouts/swift-collections",
"version": "1.2.0",
"identity": "swift-collections",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-system.git",
"name": "swift-system",
"path": "/usr/src/package/.build/checkouts/swift-system",
"version": "1.4.2",
"identity": "swift-system",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-atomics.git",
"name": "swift-atomics",
"path": "/usr/src/package/.build/checkouts/swift-atomics",
"version": "1.2.0",
"identity": "swift-atomics",
"dependencies": []
}
]
},
{
"url": "https://github.com/apple/swift-log.git",
"name": "swift-log",
"path": "/usr/src/package/.build/checkouts/swift-log",
"version": "1.6.3",
"identity": "swift-log",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-atomics.git",
"name": "swift-atomics",
"path": "/usr/src/package/.build/checkouts/swift-atomics",
"version": "1.2.0",
"identity": "swift-atomics",
"dependencies": []
},
{
"url": "https://github.com/apple/swift-algorithms.git",
"name": "swift-algorithms",
"path": "/usr/src/package/.build/checkouts/swift-algorithms",
"version": "1.2.1",
"identity": "swift-algorithms",
"dependencies": [
{
"url": "https://github.com/apple/swift-numerics.git",
"name": "swift-numerics",
"path": "/usr/src/package/.build/checkouts/swift-numerics",
"version": "1.0.3",
"identity": "swift-numerics",
"dependencies": []
}
]
}
]
}
]
}