44
49
virtual ~QueryCache() {}
45
50
/* Lookup the cache and transmit the data back to the client */
46
virtual bool try_fetch_and_send(Session *session,
47
bool is_transactional)= 0;
51
virtual bool tryFetchAndSend(Session *session,
52
bool is_transactional)= 0;
49
54
virtual bool set(Session *session, bool is_transactional)= 0;
50
virtual bool invalidate_table(Session *session, bool is_transactional)= 0;
51
virtual bool invalidate_db(Session *session, const char *db_name,
52
bool transactional)= 0;
55
virtual bool invalidateTable(Session *session, bool is_transactional)= 0;
56
virtual bool invalidateDb(Session *session, const char *db_name,
57
bool transactional)= 0;
53
58
virtual bool flush(Session *session)= 0;
60
static bool addPlugin(QueryCache *handler);
61
static void removePlugin(QueryCache *handler);
63
/* These are the functions called by the rest of the Drizzle server */
64
static bool tryFetchAndSendDo(Session *session, bool transactional);
65
static bool setDo(Session *session, bool transactional);
66
static bool invalidateTableDo(Session *session, bool transactional);
67
static bool invalidateDbDo(Session *session, const char *db_name,
69
static bool flushDo(Session *session);
72
} /* namespace plugin */
73
} /* namespace drizzled */
56
75
#endif /* DRIZZLED_PLUGIN_QUERY_CACHE_H */