Skip to content

Commit

Permalink
Ajuste de chaves de cache para incluir kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiobatalha committed Nov 13, 2015
1 parent 3f65d55 commit 7eb0a26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions analytics/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ def _compute_impact_factor(self, pub_citing_years, citable_docs):
return cit_docs

@cache_region.cache_on_arguments()
def impact_factor(self, issn, collection, titles):
def impact_factor(self, issn, collection, titles, citation_size=6):

pub_citing_years = self.bibliometrics.publication_and_citing_years(titles, citation_size=6, raw=True)
pub_citing_years = self.bibliometrics.publication_and_citing_years(titles, citation_size=citation_size, raw=True)

citable_docs = self.publication.citable_documents(issn, collection, raw=True)

Expand Down Expand Up @@ -232,7 +232,7 @@ def _compute_impact_factor_chart(self, query_result):

def impact_factor_chart(self, issn, collection, titles):

query_result = self.impact_factor(issn, collection, titles)
query_result = self.impact_factor(issn, collection, titles, citation_size=0)

return self._compute_impact_factor_chart(query_result)

Expand Down
1 change: 1 addition & 0 deletions analytics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def generate_key(*the_args, **the_kwargs):
str(fname)
]
key += [str(i) for i in the_args[1:]]
key.append(str(the_kwargs))

return "_".join(key)

Expand Down

0 comments on commit 7eb0a26

Please sign in to comment.