Re: Patch: implementation of a stream cache



Approved

On Tue, 2008-06-17 at 13:39 +0200, José Dapena Paz wrote:
> 	Hi,
> 
> 	Here's a patch implementing a simple stream cache in tinymail. The goal
> is being able to cache some streams (specifically the remote uri images
> referenced in email messages) into a local folder.
> 
> 	We provide a simple interface (TnyStreamCache) that's the simple access
> point for the cache services, and an implementation caching files to
> disk (TnyFsStreamCache).
> 
> 	The filesystem cache works very simple. When we request a cached file,
> it offers a stream accessing the cache file, and if it's not available,
> it begins fetching the file and the stream provides the data on time
> it's being received.
> 
> 	It's not very tested, but, as the implementation doesn't affect any
> other tinymail part, I think it should be safe to commit (once typical
> style/obvious issues are detected/fixed). I suppose the main issues that
> I'll need to face are related to threads work ;) as usual.
> 
> The changelog would be:
> 
> * libtinymail/tny-shared.h:
>         * Added stream cache classes and handlers
> * libtinymail/tny-stream-cache.[ch]:
>         * Interface for streams caches. It's mostly intended for image  
>           remote streams.
> * libtinymail/tny-fs-stream-cache.[ch]:
>         * Implementation of TnyStreamCache interface using a local 
>           folder for storage. This implementation tries to keep the
>           size of the cached streams lower than 1 MB.
> * libtinymail/tny-cached-file.[ch]:
>         * Data object to store status information of currently cached 
>           files. It also controls the process of fetching the remote
>           streams, and creation of streams reading from cache.
> * libtinymail/tny-cached-file-stream.[ch]:
>         * Streams wrapping TnyFsStream, that access the cache files
>           waiting when they're not completely fetched yet.
> * libtinymail/Makefile.am:
>         * Added stream cache implementation files.
> 
> 
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/tinymail-devel-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]