I’m interested in being able to store Sharp Pages and Sharp API “files” in a remote source (database, S3, etc) instead of a physical file path on the executing server. When a path/page is requested, it would first check a cache and if not there, pull from the virtual file and then execute.
It seems that all the pieces are available in ServiceStack to pull this off but just not sure how to implement it.
Pretty sure this is exactly what the Pure Cloud Apps examples already does.
Checking the local cache wont let you detect changes in the remote storage, the checkForModifiedPagesAfterSecs appsetting specifies how long to wait (and use the local cache) before checking for file changes .
How easy it is to extend this service and what would be required to do it? For example, if I wanted to pull an object out of a database instead of the S3 file path or a custom path in S3?
#Script pages work backed by a Virtual File System, so it’s able to use any of the existing VFS providers, so you’d need to either implement a custom virtual file provider or populate a Memory Virtual File System and use that.