Basic cache operation encapsulation (abstract class)

Source: Internet
Author: User
Link: http://blog.csdn.net/shadowsky/archive/2007/04/02/1548827.aspx

Imports system
Imports system. Web
Imports system. Web. caching

Namespace drmsystem. Common. caching
Public mustinherit class datacacheabstract
# Region "Abstract METHODS"

Public mustoverride function createsqltablecachedependency (byval configdatabasename as string, byval configtablename as string) as aggregatecachedependency
Public mustoverride function createfilecachedependency (byval filename as string) as aggregatecachedependency

Public mustoverride function getcache (byval key as string) as object

Public mustoverride sub remove (byval key as string)

Public mustoverride sub clear ()

Public mustoverride function add (byval key as string, byval value as object, byval dependencies as cachedependency, byval absoluteexpiration as datetime, byval loss as timespan, byval priority as limit, byval onremovecallback as limit) as object

Public mustoverride sub insert (byval key as string, byval value as object)
Public mustoverride sub insert (byval key as string, byval value as object, byval dependencies as cachedependency)
Public mustoverride sub insert (byval key as string, byval value as object, byval dependencies as cachedependency, byval absoluteexpiration as datetime, byval slidingexpiration as timespan)
Public mustoverride sub insert (byval key as string, byval value as object, byval dependencies as cachedependency, byval absoluteexpiration as datetime, byval loss as timespan, byval priority as limit, byval onremovecallback as limit)

# End Region
End Class
End namespace

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.