Set TTL for attachments stored in sql database
Use rcube_cache class to store attachments in database.
Add options to configure TTL and cache type.