+/**
+ * Appears this is only used when redownloading tiles (i.e. to invalidate old images)
+ */
+void a_mapcache_remove_all_shrinkfactors ( gint x, gint y, gint z, guint16 type, gint zoom, const gchar* name )
+{
+ char key[MC_KEY_SIZE];
+ guint nn = name ? g_str_hash ( name ) : 0;
+ g_snprintf ( key, sizeof(key), HASHKEY_FORMAT_STRING_NOSHRINK_NOR_ALPHA, type, x, y, z, zoom, nn );
+ flush_matching ( key );
+}
+
+void a_mapcache_flush ()
+{
+ List *loop = queue_tail;
+ List *tmp;
+
+ if ( queue_tail == NULL )
+ return;
+
+ g_mutex_lock(mc_mutex);
+ do {
+ tmp = loop->next;
+ cache_remove(tmp->key);
+ if ( tmp == queue_tail ) /* we deleted the last thing in the queue */
+ loop = queue_tail = NULL;
+ else
+ loop->next = tmp->next;
+ g_free ( tmp );
+ tmp = NULL;
+ } while ( loop );
+
+ g_mutex_unlock(mc_mutex);
+}
+
+/**
+ * a_mapcache_flush_type:
+ * @type: Specified map type
+ *
+ * Just remove cache items for the specified map type
+ * i.e. all related xyz+zoom+alpha+etc...
+ */
+void a_mapcache_flush_type ( guint16 type )
+{
+ char key[MC_KEY_SIZE];
+ g_snprintf ( key, sizeof(key), HASHKEY_FORMAT_STRING_TYPE, type );
+ flush_matching ( key );
+}
+