static bool replmd_recyclebin_enabled(struct ldb_module *module)
{
	bool enabled = false;
	struct replmd_private *replmd_private =
		talloc_get_type_abort(ldb_module_get_private(module),
				      struct replmd_private);

	/*
	 * only lookup the recycle-bin state once per replication, then cache
	 * the result. This can save us 1000s of DB searches
	 */
	if (!replmd_private->recyclebin_state_known) {
		int ret = dsdb_recyclebin_enabled(module, &enabled);
		if (ret != LDB_SUCCESS) {
			return false;
		}

		replmd_private->recyclebin_enabled = enabled;
		replmd_private->recyclebin_state_known = true;
	}

	return replmd_private->recyclebin_enabled;
}
static bool replmd_recyclebin_enabled(struct ldb_module *module)
{
	bool enabled = false;
	struct replmd_private *replmd_private =
		talloc_get_type_abort(ldb_module_get_private(module),
				      struct replmd_private);

	 
	if (!replmd_private->recyclebin_state_known) {
		int ret = dsdb_recyclebin_enabled(module, &enabled);
		if (ret != LDB_SUCCESS) {
			return false;
		}

		replmd_private->recyclebin_enabled = enabled;
		replmd_private->recyclebin_state_known = true;
	}

	return replmd_private->recyclebin_enabled;
}