@Override
    public List<Ingredient> retrieveAllIngredients() throws DataStoreException {
        if ( isIngredientCacheValid ){
            return ingredientCache;
        }

        List<Ingredient> ingredients = new LinkedList<>();

        try (   Connection conn = getConnection();
                ResultSet rs = executeStatement(conn, "SELECT name_singular, name_plural, common FROM ingredients ORDER BY length(name_singular) DESC") ){
            if(rs != null){
                while(rs.next()){
                    String singular = rs.getString("name_singular");
                    String plural = rs.getString("name_plural");
                    Boolean common = rs.getBoolean("common");

                    Ingredient ingredient = new Ingredient(singular, plural, common);
                    ingredients.add(ingredient);
                }
            }
        }
        catch(SQLException e){
            LOGGER.error("Exception while retrieving ingredients (" + e.getMessage() + ")" ) ;
            throw new DataStoreException(e.getMessage());
        }

        ingredientCache = ingredients;
        isIngredientCacheValid = true;
        return ingredients;
    }