private static void saveCategoriesWithoutTransaction(final Geocache cache) {
        final String geocode = cache.getGeocode();

        // The attributes must be fetched first because lazy loading may load
        // a null set otherwise.
        final Set<Category> categories = cache.getCategories();
        database.delete(dbTableCategories, "geocode = ?", new String[]{geocode});

        if (categories.isEmpty()) {
            return;
        }
        final SQLiteStatement statement = PreparedStatement.INSERT_CATEGORY.getStatement();
        for (final Category category : categories) {
            if (category == null) {
                continue;
            }
            statement.bindString(1, geocode);
            statement.bindString(2, category.getRaw());

            statement.executeInsert();
        }
    }
Save/store a cache to the CacheCache

@param caches the caches to save in the CacheCache/DB
main/src/main/java/cgeo/geocaching/storage/DataStore.java