Added feed aggregations ids.
This is used to avoid computing the whole feed aggregation to decide if a feed block is included or not.
This commit is contained in:
@@ -14,6 +14,20 @@ create
|
|||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
|
aggregations_ids: detachable ITERABLE [READABLE_STRING_GENERAL]
|
||||||
|
local
|
||||||
|
l_table: like internal_aggregations
|
||||||
|
do
|
||||||
|
l_table := internal_aggregations
|
||||||
|
if l_table /= Void then
|
||||||
|
Result := l_table.current_keys
|
||||||
|
elseif attached cms_api.module_configuration_by_name ({FEED_AGGREGATOR_MODULE}.name, "feeds") as cfg then
|
||||||
|
if attached cfg.text_list_item ("ids") as l_ids then
|
||||||
|
Result := l_ids
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
aggregations: HASH_TABLE [FEED_AGGREGATION, STRING]
|
aggregations: HASH_TABLE [FEED_AGGREGATION, STRING]
|
||||||
-- List of feed aggregations.
|
-- List of feed aggregations.
|
||||||
local
|
local
|
||||||
|
|||||||
@@ -214,15 +214,17 @@ feature -- Hook
|
|||||||
-- List of block names, managed by current object.
|
-- List of block names, managed by current object.
|
||||||
local
|
local
|
||||||
res: ARRAYED_LIST [like {CMS_BLOCK}.name]
|
res: ARRAYED_LIST [like {CMS_BLOCK}.name]
|
||||||
l_aggs: HASH_TABLE [FEED_AGGREGATION, STRING_8]
|
utf_conv: UTF_CONVERTER
|
||||||
do
|
do
|
||||||
if attached feed_aggregator_api as l_feed_api then
|
if
|
||||||
l_aggs := l_feed_api.aggregations
|
attached feed_aggregator_api as l_feed_api and then
|
||||||
create res.make (l_aggs.count)
|
attached l_feed_api.aggregations_ids as l_aggs
|
||||||
|
then
|
||||||
|
create res.make (1)
|
||||||
across
|
across
|
||||||
l_aggs as ic
|
l_aggs as ic
|
||||||
loop
|
loop
|
||||||
res.force ("?feed." + ic.key)
|
res.force ("?feed." + utf_conv.utf_32_string_to_utf_8_string_8 (ic.item))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
create res.make (0)
|
create res.make (0)
|
||||||
|
|||||||
Reference in New Issue
Block a user